[vlc-devel] [PATCH 05/14] videotoolbox: remove useless CopyDecoderExtradataDefault

Marvin Scholz epirat07 at gmail.com
Fri Jul 3 04:27:35 CEST 2020


Calling ExtradataInfoCreate with NULL for the data argument makes it
return NULL anyway, so instead just do not provide this callback at all
as the code already handles it fine when this callback is NULL.
---
 modules/codec/videotoolbox.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index 75229ad722..709f2db4f3 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -785,12 +785,6 @@ static CFDictionaryRef CopyDecoderExtradataMPEG4(decoder_t *p_dec)
         return NULL; /* MPEG4 without esds ? */
 }
 
-static CFDictionaryRef CopyDecoderExtradataDefault(decoder_t *p_dec)
-{
-    VLC_UNUSED(p_dec);
-    return ExtradataInfoCreate(NULL, NULL, 0); /* Empty Needed ? */
-}
-
 /* !Codec Specific */
 
 static void InsertIntoDPB(decoder_sys_t *p_sys, frame_info_t *p_info)
@@ -1455,7 +1449,7 @@ static int OpenDecoder(vlc_object_t *p_this)
             break;
 
         default:
-            p_sys->pf_copy_extradata = CopyDecoderExtradataDefault;
+            p_sys->pf_copy_extradata = NULL;
             break;
     }
 
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list