[FFmpeg-cvslog] videotoolbox: fix crash when decoding interlaced video with new API

wm4 git at videolan.org
Tue Jul 11 19:27:10 EEST 2017


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Tue Jul 11 18:24:31 2017 +0200| [02d248d5828dbbfecfb37597c626900f41448bea] | committer: wm4

videotoolbox: fix crash when decoding interlaced video with new API

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

 libavcodec/videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 1b1be41934..dd13e2581b 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -249,7 +249,7 @@ static int videotoolbox_buffer_create(AVCodecContext *avctx, AVFrame *frame)
         vtctx->cached_hw_frames_ctx = hw_frames_ctx;
     }
 
-    av_assert0(!frame->hw_frames_ctx);
+    av_buffer_unref(&frame->hw_frames_ctx);
     frame->hw_frames_ctx = av_buffer_ref(vtctx->cached_hw_frames_ctx);
     if (!frame->hw_frames_ctx)
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list