mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
vd_lavc: simplify hwdec pixfmt check
Instead of checking whether the format is a hwaccel format, check whether it's the exact format we've requested for hardware decoding.
This commit is contained in:
parent
f04cb7bf48
commit
d549c4e402
@ -600,7 +600,7 @@ static int get_buffer2_hwdec(AVCodecContext *avctx, AVFrame *pic, int flags)
|
||||
vd_ffmpeg_ctx *ctx = vd->priv;
|
||||
|
||||
int imgfmt = pixfmt2imgfmt(pic->format);
|
||||
if (!IMGFMT_IS_HWACCEL(imgfmt) || !ctx->hwdec)
|
||||
if (!ctx->hwdec || ctx->hwdec_fmt != imgfmt)
|
||||
ctx->hwdec_failed = true;
|
||||
|
||||
/* Hardware decoding failed, and we will trigger a proper fallback later
|
||||
|
Loading…
Reference in New Issue
Block a user