Commit 8e7b5ba8 authored by James Almer's avatar James Almer

avcodec/decode: actually propagate AVHWAccel.alloc_frame() return value

Finishes fixing the regression introduced in a1133db3
after the partial fix in b6d6597b.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 821fda81
...@@ -1911,10 +1911,12 @@ end: ...@@ -1911,10 +1911,12 @@ end:
frame->height = avctx->height; frame->height = avctx->height;
} }
return 0;
fail: fail:
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); if (ret < 0) {
av_frame_unref(frame); av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
av_frame_unref(frame);
}
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment