[vlc-commits] videotoolbox: handle AnnexB in extradata

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


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

videotoolbox: handle AnnexB in extradata

(cherry picked from commit dfa29f617bd7addca4be87d8e8da1fa8c089716f)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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