diff --git a/modules/videoio/src/cap.cpp b/modules/videoio/src/cap.cpp index 97c3a6447e..8b74111d5a 100644 --- a/modules/videoio/src/cap.cpp +++ b/modules/videoio/src/cap.cpp @@ -382,6 +382,8 @@ static CvVideoWriter* cvCreateVideoWriterWithPreference(const char* filename, in if(!fourcc || !fps) TRY_OPEN(result, cvCreateVideoWriter_Images(filename)) + CV_Assert(result || fps != 0); + switch(apiPreference) { default: