mpeg12video_parser: Wrong bit rate in MPEG2 video file (Ticket #1862)
authorHeesuk Jung <heesuk.jung@lge.com>
Tue, 30 Oct 2012 01:07:40 +0000 (02:07 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 30 Oct 2012 01:19:52 +0000 (02:19 +0100)
mpegvideo parser sometime get wrong stream bit rate which is 0x3FFFF*400.
But maximum bit rate of MPEG2 video is up to 80 Mbps in case 1920x1080 resolution.
When bit rate is 0x3FFFF*400, set bit rate zero.

* Problematic link
https://docs.google.com/open?id=0B6r7ZfWFIypCUkhPa0dyTGdFSE0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo_parser.c

index bea83a2..5fb2799 100644 (file)
@@ -131,7 +131,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
         }
     }
  the_end: ;
-    if (bit_rate) {
+    if (bit_rate && bit_rate != 0x3FFFF) {
         avctx->bit_rate = 400 * bit_rate;
     }
 }