From: Rick Kern <ker...@gmail.com> The CMSampleBufferRef passed into the encoder can be NULL. Added check.
Signed-off-by: Rick Kern <ker...@gmail.com> --- libavcodec/vtenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vtenc.c b/libavcodec/vtenc.c index 583244c..78a918b 100644 --- a/libavcodec/vtenc.c +++ b/libavcodec/vtenc.c @@ -285,11 +285,11 @@ static av_cold void vtenc_output_callback( VTEncContext* vtctx = (VTEncContext*)avctx->priv_data; if(vtctx->async_error){ - CFRelease(sample_buffer); + if(sample_buffer) CFRelease(sample_buffer); return; } - if(status){ + if(status || !sample_buffer){ av_log(avctx, AV_LOG_ERROR, "Error encoding frame: %d\n", status); set_async_error(vtctx, AVERROR_EXTERNAL); return; -- 2.4.9 (Apple Git-60) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel