diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-20 12:31:38 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-03-21 09:53:37 -0700 |
commit | fcc81cd940dc721773a91301c60755aa11010a86 (patch) | |
tree | 5c2579f59ca337fc91e3ccec0b0ec542933ad21d /video/decode/vd_lavc.c | |
parent | f871294204529374dd3056f7b616381400233036 (diff) | |
download | mpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.bz2 mpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.xz |
vo_gpu[_next]: hwdec: fix logging regression when probing
When I introduced the concept of lazy loading of hwdecs by img format,
I did not propagate the probing flag correctly, leading to the new
normal loading path not runnng with probing set, meaning that any
errors would show up, creating unnecessary noise.
This change fixes this regression.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 20efb26dd3..a5fb748e4d 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -431,8 +431,11 @@ static AVBufferRef *hwdec_create_dev(struct mp_filter *vd, return ref; } } else if (ctx->hwdec_devs) { - hwdec_devices_request_for_img_fmt(ctx->hwdec_devs, - pixfmt2imgfmt(hwdec->pix_fmt)); + struct hwdec_imgfmt_request params = { + .imgfmt = pixfmt2imgfmt(hwdec->pix_fmt), + .probing = autoprobe, + }; + hwdec_devices_request_for_img_fmt(ctx->hwdec_devs, ¶ms); return hwdec_devices_get_lavc(ctx->hwdec_devs, hwdec->lavc_device); } @@ -512,9 +515,14 @@ static void select_and_set_hwdec(struct mp_filter *vd) } else if (!hwdec->copying) { // Most likely METHOD_INTERNAL, which often use delay-loaded // VO support as well. - if (ctx->hwdec_devs) + if (ctx->hwdec_devs) { + struct hwdec_imgfmt_request params = { + .imgfmt = pixfmt2imgfmt(hwdec->pix_fmt), + .probing = hwdec_auto, + }; hwdec_devices_request_for_img_fmt( - ctx->hwdec_devs, pixfmt2imgfmt(hwdec->pix_fmt)); + ctx->hwdec_devs, ¶ms); + } } ctx->use_hwdec = true; |