[FFmpeg-devel] [PATCH] lavc/videotoolboxenc: Fix crash when closing codec after error
Richard Kern
kernrj at gmail.com
Thu Mar 24 17:20:33 CET 2016
Can this one be reviewed too?
> On Mar 21, 2016, at 12:55 AM, Rick Kern <kernrj at gmail.com> wrote:
>
> 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>
> ---
> 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);
> --
> 2.5.4 (Apple Git-61)
>
More information about the ffmpeg-devel
mailing list