aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2016-06-17 15:51:08 +0200
committerClément Bœsch <clement@stupeflix.com>2016-06-17 17:46:19 +0200
commit6fd58eba1cd1e3598f94be18dcd867f1b3af69dd (patch)
treef18e8867e5ebe6a1cf0e83a0f9c89534be021736 /libavcodec
parent2770e16d700e55c1835486da1baa07318ee3df18 (diff)
downloadffmpeg-6fd58eba1cd1e3598f94be18dcd867f1b3af69dd.tar.gz
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."
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/videotoolbox.c4
1 files changed, 3 insertions, 1 deletions
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);
+ }
}
}