mpeg12videodec: dont pass mpeg1 VBR special case value on as bitrate.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 30 Oct 2012 01:27:50 +0000 (02:27 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 30 Oct 2012 01:27:50 +0000 (02:27 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12.c

index 3d01a2e..bdb6b00 100644 (file)
@@ -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;