aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeesuk Jung <heesuk.jung@lge.com>2012-10-30 02:07:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-10-30 02:19:52 +0100
commitc349177b8cc0deb67df51ec1280c8e5a897a8067 (patch)
treec826170577b03a6671deeaf3c56b05f2327bdce2
parent740959fdbfbf804ccd8a6e426b1b1ba321fe5cfb (diff)
downloadffmpeg-c349177b8cc0deb67df51ec1280c8e5a897a8067.tar.gz
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@gmx.at>
-rw-r--r--libavcodec/mpegvideo_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index bea83a262c..5fb2799814 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;
}
}