History

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

Fixes bitrate detection in CBR mpeg2 Fixes ticket3678

Michael Niedermayer committed 12 years ago

Commit d647ef01 parent 08a110c1 file · +3 −2Browse files

Unified · Split

libavcodec/mpegvideo_parser.c+3−2
@@ -145,8 +145,9 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 144 unmodified lines
145 the_end: ;145 the_end: ;
146 if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && bit_rate) {146 if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && bit_rate) {
147 avctx->rc_max_rate = 400*bit_rate;147 avctx->rc_max_rate = 400*bit_rate;
148 } else if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate &&148 }
149 (bit_rate != 0x3FFFF || vbv_delay != 0xFFFF)) {149 if (bit_rate &&
150 ((avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate != 0x3FFFF) || vbv_delay != 0xFFFF)) {
150 avctx->bit_rate = 400*bit_rate;151 avctx->bit_rate = 400*bit_rate;
151 }152 }
152}153}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t