1
0
Fork 0

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>
This commit is contained in:
Andreas Rheinhardt 2023-09-13 20:36:43 +02:00
parent ac64800edd
commit 63eb630915
1 changed files with 1 additions and 3 deletions

View File

@ -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];