Skip to content
Snippets Groups Projects
Commit d647ef0c authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/mpegvideo_parser: consider vbv_delay in bitrate heuristic also for mpeg2

Fixes bitrate detection in CBR mpeg2
Fixes ticket3678
parent 08a110ca
No related branches found
No related tags found
No related merge requests found
...@@ -145,8 +145,9 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, ...@@ -145,8 +145,9 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
the_end: ; the_end: ;
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && bit_rate) { if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && bit_rate) {
avctx->rc_max_rate = 400*bit_rate; avctx->rc_max_rate = 400*bit_rate;
} else if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate && }
(bit_rate != 0x3FFFF || vbv_delay != 0xFFFF)) { if (bit_rate &&
((avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate != 0x3FFFF) || vbv_delay != 0xFFFF)) {
avctx->bit_rate = 400*bit_rate; avctx->bit_rate = 400*bit_rate;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment