]> git.sesse.net Git - ffmpeg/commitdiff
videotoolbox: fix crash when decoding interlaced video with new API
authorwm4 <nfxjfg@googlemail.com>
Tue, 11 Jul 2017 16:24:31 +0000 (18:24 +0200)
committerwm4 <nfxjfg@googlemail.com>
Tue, 11 Jul 2017 16:27:27 +0000 (18:27 +0200)
libavcodec/videotoolbox.c

index 1b1be419347c64602b0187c9859897fb3fbc8b20..dd13e2581b068df230e3e1c5c0201e881a4cb4a9 100644 (file)
@@ -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);