mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/mpegvideo_parser: consider vbv_delay in bitrate heuristic also for mpeg2
Fixes bitrate detection in CBR mpeg2 Fixes ticket3678
This commit is contained in:
parent
08a110ca87
commit
d647ef0c80
1 changed files with 3 additions and 2 deletions
|
|
@ -145,8 +145,9 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
|
|||
the_end: ;
|
||||
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue