diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-13 20:36:43 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-19 18:11:46 +0200 |
commit | 63eb630915b9ef92d21e521d610ed9d3ee2f358f (patch) | |
tree | 72ccb09bfcfc23b6b93dde245a97b83801d52e3b | |
parent | ac64800edd341af80558b96a0213ce6d2d99cc2c (diff) | |
download | ffmpeg-63eb630915b9ef92d21e521d610ed9d3ee2f358f.tar.gz |
avcodec/libvpxdec: Remove redundant unreferencing of AVFrame
The AVFrame of a decoder with the ordinary decode callback
is generically unreferenced on error.
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/libvpxdec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 72ef5fa9a7..c6187fd5a1 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -317,10 +317,8 @@ static int vpx_decode(AVCodecContext *avctx, AVFrame *picture, return AVERROR(ENOMEM); if (ctx->has_alpha_channel) { picture->buf[1] = av_buffer_ref(img_alpha->fb_priv); - if (!picture->buf[1]) { - av_frame_unref(picture); + if (!picture->buf[1]) return AVERROR(ENOMEM); - } } for (int i = 0; i < 4; i++) { picture->data[i] = planes[i]; |