summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-03-20 12:31:38 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-03-21 09:53:37 -0700
commitfcc81cd940dc721773a91301c60755aa11010a86 (patch)
tree5c2579f59ca337fc91e3ccec0b0ec542933ad21d /video/decode
parentf871294204529374dd3056f7b616381400233036 (diff)
downloadmpv-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')
-rw-r--r--video/decode/vd_lavc.c16
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, &params);
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, &params);
+ }
}
ctx->use_hwdec = true;