[FFmpeg-cvslog] lavc/videotoolboxenc: Fix crash when closing codec after error

Rick Kern git at videolan.org
Sat Apr 2 19:16:47 CEST 2016


ffmpeg | branch: master | Rick Kern <kernrj at gmail.com> | Mon Mar 21 00:55:56 2016 +0800| [78016694706776fbfe4be9533704be3180b31623] | committer: 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: Rick Kern <kernrj at gmail.com>
Signed-off-by: wm4 <nfxjfg at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78016694706776fbfe4be9533704be3180b31623
---

 libavcodec/videotoolboxenc.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 3ed1f64..0791146 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);



More information about the ffmpeg-cvslog mailing list