From 651a1d28691f5afc48d086fafbd8a32003e585ec Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Mon, 7 Aug 2017 13:45:00 +0300 Subject: [PATCH] videoio: don't pass zero fps to 3rd-party codecs --- modules/videoio/src/cap.cpp | 2 ++ 1 file changed, 2 insertions(+) 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: