summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolbox.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-07-11 18:24:31 +0200
committerwm4 <nfxjfg@googlemail.com>2017-07-11 18:27:27 +0200
commit02d248d5828dbbfecfb37597c626900f41448bea (patch)
tree4df6621b21327446d6223d949c92bf0ea0117722 /libavcodec/videotoolbox.c
parent0780ad9c688cc8272daa7780d3f112a9f55208ca (diff)
videotoolbox: fix crash when decoding interlaced video with new API
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c2
1 files changed, 1 insertions, 1 deletions
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);