[FFmpeg-cvslog] mpeg12videodec: dont pass mpeg1 VBR special case value on as bitrate.

Michael Niedermayer git at videolan.org
Tue Oct 30 02:44:25 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 30 02:27:50 2012 +0100| [4b7f34a34e4569228627c8954fab08a49203c89c] | committer: Michael Niedermayer

mpeg12videodec: dont pass mpeg1 VBR special case value on as bitrate.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b7f34a34e4569228627c8954fab08a49203c89c
---

 libavcodec/mpeg12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 3d01a2e..bdb6b00 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1278,7 +1278,8 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
             return -2;
 
         avcodec_set_dimensions(avctx, s->width, s->height);
-        avctx->bit_rate          = s->bit_rate;
+        if (s->bit_rate && s->bit_rate != 0x3FFFF*400)
+            avctx->bit_rate          = s->bit_rate;
         s1->save_aspect_info     = s->aspect_ratio_info;
         s1->save_width           = s->width;
         s1->save_height          = s->height;



More information about the ffmpeg-cvslog mailing list