From dfa29f617bd7addca4be87d8e8da1fa8c089716f Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Tue, 23 Jan 2018 11:42:35 +0100 Subject: [PATCH] videotoolbox: handle AnnexB in extradata --- modules/codec/videotoolbox.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index bb377cf1c6..358131a65c 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -364,8 +364,9 @@ static CFMutableDictionaryRef GetDecoderExtradataH264(decoder_t *p_dec) decoder_sys_t *p_sys = p_dec->p_sys; CFMutableDictionaryRef extradata = nil; - if(p_dec->fmt_in.i_extra) /* copy DecoderConfiguration */ + if (p_dec->fmt_in.i_extra && p_sys->hh.b_is_xvcC) { + /* copy DecoderConfiguration */ extradata = ExtradataInfoCreate(CFSTR("avcC"), p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra); @@ -685,8 +686,9 @@ static CFMutableDictionaryRef GetDecoderExtradataHEVC(decoder_t *p_dec) decoder_sys_t *p_sys = p_dec->p_sys; CFMutableDictionaryRef extradata = nil; - if(p_dec->fmt_in.i_extra) /* copy DecoderConfiguration */ + if (p_dec->fmt_in.i_extra && p_sys->hh.b_is_xvcC) { + /* copy DecoderConfiguration */ extradata = ExtradataInfoCreate(CFSTR("hvcC"), p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra); -- 2.11.4.GIT