Commit c349177b authored by Heesuk Jung's avatar Heesuk Jung Committed by 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=0B6r7ZfWFIypCUkhPa0dyTGdFSE0Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 740959fd
...@@ -131,7 +131,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, ...@@ -131,7 +131,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
} }
} }
the_end: ; the_end: ;
if (bit_rate) { if (bit_rate && bit_rate != 0x3FFFF) {
avctx->bit_rate = 400 * bit_rate; avctx->bit_rate = 400 * bit_rate;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment