From 6fd58eba1cd1e3598f94be18dcd867f1b3af69dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 17 Jun 2016 15:51:08 +0200 Subject: [PATCH] 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." --- libavcodec/videotoolbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 384bb8a598..7f726120cd 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); + } } } -- 2.11.0