summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-19 15:00:21 +0200
committerwm4 <wm4@nowhere>2015-10-19 15:00:21 +0200
commite1128c8b28a467c131eba6ce8f48f150f8ef5fd7 (patch)
treedfbb8c8f7e168a2fc2987ba6221565dcacf4d692 /common
parente3de309804d27d3ed41a45f37ca6a37ba3d4a267 (diff)
downloadmpv-e1128c8b28a467c131eba6ce8f48f150f8ef5fd7.tar.bz2
mpv-e1128c8b28a467c131eba6ce8f48f150f8ef5fd7.tar.xz
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.
Diffstat (limited to 'common')
-rw-r--r--common/av_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/av_common.c b/common/av_common.c
index 87616b9879..c1b188474a 100644
--- a/common/av_common.c
+++ b/common/av_common.c
@@ -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.