[FFmpeg-cvslog] lavc/videotoolbox: CFRelease() session

Clément Bœsch git at videolan.org
Fri Jun 17 18:10:06 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Fri Jun 17 15:51:08 2016 +0200| [6fd58eba1cd1e3598f94be18dcd867f1b3af69dd] | committer: Clément Bœsch

lavc/videotoolbox: CFRelease() session

"When you are done with a decompression session you created, call
VTDecompressionSessionInvalidate to tear it down and then CFRelease to
release your object reference."

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fd58eba1cd1e3598f94be18dcd867f1b3af69dd
---

 libavcodec/videotoolbox.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 384bb8a..7f72612 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -628,8 +628,10 @@ static void videotoolbox_default_free(AVCodecContext *avctx)
         if (videotoolbox->cm_fmt_desc)
             CFRelease(videotoolbox->cm_fmt_desc);
 
-        if (videotoolbox->session)
+        if (videotoolbox->session) {
             VTDecompressionSessionInvalidate(videotoolbox->session);
+            CFRelease(videotoolbox->session);
+        }
     }
 }
 



More information about the ffmpeg-cvslog mailing list