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>
pull/390/head
Andreas Rheinhardt 1 year ago
parent ac64800edd
commit 63eb630915
  1. 4
      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];

Loading…
Cancel
Save