diff options
-rw-r--r-- | libavcodec/videotoolbox.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index f82c31c..57b6698 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -326,11 +326,8 @@ static int videotoolbox_set_frame(AVCodecContext *avctx, AVFrame *frame) CVPixelBufferRef *ref = (CVPixelBufferRef *)frame->buf[0]->data; - if (*ref) { - av_log(avctx, AV_LOG_ERROR, "videotoolbox: frame already set?\n"); - av_frame_unref(frame); - return AVERROR_EXTERNAL; - } + if (*ref) + CVPixelBufferRelease(*ref); *ref = vtctx->frame; vtctx->frame = NULL; |