[FFmpeg-cvslog] mpeg12video_parser: Wrong bit rate in MPEG2 video file (Ticket #1862)

Heesuk Jung git at videolan.org
Tue Oct 30 02:44:25 CET 2012


ffmpeg | branch: master | Heesuk Jung <heesuk.jung at lge.com> | Tue Oct 30 02:07:40 2012 +0100| [c349177b8cc0deb67df51ec1280c8e5a897a8067] | committer: Michael Niedermayer

mpeg12video_parser: Wrong bit rate in MPEG2 video file (Ticket #1862)

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 at gmx.at>

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

 libavcodec/mpegvideo_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index bea83a2..5fb2799 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -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;
     }
 }



More information about the ffmpeg-cvslog mailing list