Fixes regression caused by a1133db30ef07896afd96f067e5c51531a4e85ab. On my Mac, the bug seems to make `mpv --hwdec=auto` always fail with:
[ffmpeg/video] h264: get_buffer() failed [ffmpeg] Assertion src->f->buf[0] failed at src/libavcodec/h264_picture.c:70 Signed-off-by: comex <com...@gmail.com> --- libavcodec/decode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 48a61d5419..3fdfb551e3 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1889,7 +1889,8 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) if (hwaccel) { if (hwaccel->alloc_frame) { ret = hwaccel->alloc_frame(avctx, frame); - goto fail; + if (ret < 0) + goto fail; } } else avctx->sw_pix_fmt = avctx->pix_fmt; -- 2.26.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".