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>
This commit is contained in:
Rick Kern 2016-03-21 00:55:56 +08:00 committed by wm4
parent ffd1c3eeb7
commit 7801669470
1 changed files with 0 additions and 1 deletions

View File

@ -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);