mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()
Regression since a1133db30e
Found-by: comex <comexk@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
6d4fdb4f5a
commit
b6d6597bef
|
@ -1889,7 +1889,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
|
||||||
if (hwaccel) {
|
if (hwaccel) {
|
||||||
if (hwaccel->alloc_frame) {
|
if (hwaccel->alloc_frame) {
|
||||||
ret = hwaccel->alloc_frame(avctx, frame);
|
ret = hwaccel->alloc_frame(avctx, frame);
|
||||||
goto fail;
|
goto end;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
avctx->sw_pix_fmt = avctx->pix_fmt;
|
avctx->sw_pix_fmt = avctx->pix_fmt;
|
||||||
|
@ -1904,6 +1904,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
end:
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
|
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
|
||||||
!(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
|
!(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
|
||||||
frame->width = avctx->width;
|
frame->width = avctx->width;
|
||||||
|
|
Loading…
Reference in New Issue