summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolbox.c
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2018-03-28 23:19:28 -0500
committerAman Gupta <aman@tmm1.net>2018-04-10 10:24:28 -0700
commit4c0798578cab410b4ad9c27bc47b5e09c9a66aba (patch)
tree2aced7bc5be1c5fabf2ac92218352d78b4ac17d3 /libavcodec/videotoolbox.c
parentd64183ea5da9c5248578d0bc4ffcbeddfc6c3555 (diff)
lavc/videotoolbox: fix failure to decode PAFF
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index f82c31c5df..57b6698e1b 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;