From 802fcc57a21053c25273b8c563d0039877f705d9 Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Thu, 16 Jun 2011 08:31:08 +0000 Subject: [PATCH] fixed "bitrate tolerance too small for bitrate" --- modules/highgui/src/cap_ffmpeg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/highgui/src/cap_ffmpeg.cpp b/modules/highgui/src/cap_ffmpeg.cpp index ee59ae14a..f58eeb670 100644 --- a/modules/highgui/src/cap_ffmpeg.cpp +++ b/modules/highgui/src/cap_ffmpeg.cpp @@ -1307,6 +1307,8 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, CV_Error(CV_StsBadArg, "codec not found"); } + c->bit_rate_tolerance = c->bit_rate; + /* open the codec */ if ( (err=avcodec_open(c, codec)) < 0) { char errtext[256];