[FFmpeg-cvslog] avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()
James Almer
git at videolan.org
Thu May 28 05:14:11 EEST 2020
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed May 27 23:10:04 2020 -0300| [b6d6597bef66531ec07c07a7125b88aee38fb220] | committer: James Almer
avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()
Regression since a1133db30ef07896afd96f067e5c51531a4e85ab
Found-by: comex <comexk at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6d6597bef66531ec07c07a7125b88aee38fb220
---
libavcodec/decode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index e438135b53..eed89a89a7 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1889,7 +1889,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
if (hwaccel) {
if (hwaccel->alloc_frame) {
ret = hwaccel->alloc_frame(avctx, frame);
- goto fail;
+ goto end;
}
} else
avctx->sw_pix_fmt = avctx->pix_fmt;
@@ -1904,6 +1904,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
if (ret < 0)
goto fail;
+end:
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
!(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
frame->width = avctx->width;
More information about the ffmpeg-cvslog
mailing list