mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
ac64800edd
commit
63eb630915
|
@ -317,10 +317,8 @@ static int vpx_decode(AVCodecContext *avctx, AVFrame *picture,
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
if (ctx->has_alpha_channel) {
|
if (ctx->has_alpha_channel) {
|
||||||
picture->buf[1] = av_buffer_ref(img_alpha->fb_priv);
|
picture->buf[1] = av_buffer_ref(img_alpha->fb_priv);
|
||||||
if (!picture->buf[1]) {
|
if (!picture->buf[1])
|
||||||
av_frame_unref(picture);
|
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
picture->data[i] = planes[i];
|
picture->data[i] = planes[i];
|
||||||
|
|
Loading…
Reference in New Issue