1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00

video: pass through libavformat has_b_frames field

This fixes initial decoding of some samples. See #1341.

According to Libav devs, this should be considered a libavcodec bug, but
as it's hard to fix, here we go.
This commit is contained in:
wm4 2015-10-19 15:00:21 +02:00
parent e3de309804
commit e1128c8b28

View File

@ -65,6 +65,7 @@ void mp_copy_lav_codec_headers(AVCodecContext *avctx, AVCodecContext *st)
avctx->block_align = st->block_align;
avctx->channel_layout = st->channel_layout;
avctx->bits_per_coded_sample = st->bits_per_coded_sample;
avctx->has_b_frames = st->has_b_frames;
}
// We merely pass-through our PTS/DTS as an int64_t; libavcodec won't use it.