Commit 78016694 authored by Rick Kern's avatar Rick Kern Committed by wm4

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: 's avatarRick Kern <kernrj@gmail.com>
Signed-off-by: 's avatarwm4 <nfxjfg@googlemail.com>
parent ffd1c3ee
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment