[vlc-commits] videotoolbox: handle AnnexB in extradata

Thomas Guillem git at videolan.org
Tue Jan 23 12:12:04 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan 23 11:42:35 2018 +0100| [dfa29f617bd7addca4be87d8e8da1fa8c089716f] | committer: Thomas Guillem

videotoolbox: handle AnnexB in extradata

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfa29f617bd7addca4be87d8e8da1fa8c089716f
---

 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);



More information about the vlc-commits mailing list