[vlc-commits] codec: videotoolbox: don't release extradataInfo if re-used

Thomas Guillem git at videolan.org
Wed Sep 13 11:15:15 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 13 10:28:30 2017 +0200| [d639a9ee0daba19350eee1984d425c48495f3a24] | committer: Thomas Guillem

codec: videotoolbox: don't release extradataInfo if re-used

No changes since SetH264DecoderInfo() is not yet called with a re-used
extradataInfo.

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

 modules/codec/videotoolbox.m | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 579133211c..a48d66dcd0 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1168,11 +1168,11 @@ static int SetH264DecoderInfo(decoder_t *p_dec, CFMutableDictionaryRef extradata
     p_dec->fmt_out.video.i_sar_den = i_sar_den;
 
     if (extradataInfo == nil)
-        extradataInfo = H264ExtradataInfoCreate(&p_sys->hh);
-
-    if (p_sys->extradataInfo != nil)
-        CFRelease(p_sys->extradataInfo);
-    p_sys->extradataInfo = extradataInfo;
+    {
+        if (p_sys->extradataInfo != nil)
+            CFRelease(p_sys->extradataInfo);
+        p_sys->extradataInfo = H264ExtradataInfoCreate(&p_sys->hh);
+    }
 
     return (p_sys->extradataInfo == nil) ? VLC_EGENERIC: VLC_SUCCESS;
 }



More information about the vlc-commits mailing list