summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolboxenc.c
diff options
context:
space:
mode:
authorRick Kern <kernrj@gmail.com>2016-03-21 00:55:56 +0800
committerwm4 <nfxjfg@googlemail.com>2016-04-02 19:16:15 +0200
commit78016694706776fbfe4be9533704be3180b31623 (patch)
tree2a837287bc41757dbf53ea098c955bff2cc22307 /libavcodec/videotoolboxenc.c
parentffd1c3eeb7043a51d1483ce7fb56772d32f02963 (diff)
downloadffmpeg-78016694706776fbfe4be9533704be3180b31623.tar.gz
lavc/videotoolboxenc: Fix crash when closing codec after error
Fixes crash in #5352. VTCompressionSessionInvalidate() crashes if the internal encoder hasn't completed, but hasn't experienced an error. The function call isn't needed since the encoder is invalidated when the reference count reaches 0 anyway. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavcodec/videotoolboxenc.c')
-rw-r--r--libavcodec/videotoolboxenc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 3ed1f646cf..07911469f0 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1275,7 +1275,6 @@ static av_cold int vtenc_close(AVCodecContext *avctx)
if(!vtctx->session) return 0;
- VTCompressionSessionInvalidate(vtctx->session);
pthread_cond_destroy(&vtctx->cv_sample_sent);
pthread_mutex_destroy(&vtctx->lock);
CFRelease(vtctx->session);