summaryrefslogtreecommitdiffstats
path: root/video/hwdec.c
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/hwdec.c
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/hwdec.c')
-rw-r--r--video/hwdec.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/video/hwdec.c b/video/hwdec.c
index 596a418865..f9b1df32e2 100644
--- a/video/hwdec.c
+++ b/video/hwdec.c
@@ -13,7 +13,8 @@ struct mp_hwdec_devices {
struct mp_hwdec_ctx **hwctxs;
int num_hwctxs;
- void (*load_api)(void *ctx, int imgfmt);
+ void (*load_api)(void *ctx,
+ struct hwdec_imgfmt_request *params);
void *load_api_ctx;
};
@@ -95,16 +96,18 @@ void hwdec_devices_remove(struct mp_hwdec_devices *devs, struct mp_hwdec_ctx *ct
}
void hwdec_devices_set_loader(struct mp_hwdec_devices *devs,
- void (*load_api)(void *ctx, int imgfmt), void *load_api_ctx)
+ void (*load_api)(void *ctx, struct hwdec_imgfmt_request *params),
+ void *load_api_ctx)
{
devs->load_api = load_api;
devs->load_api_ctx = load_api_ctx;
}
-void hwdec_devices_request_for_img_fmt(struct mp_hwdec_devices *devs, int imgfmt)
+void hwdec_devices_request_for_img_fmt(struct mp_hwdec_devices *devs,
+ struct hwdec_imgfmt_request *params)
{
if (devs->load_api && !hwdec_devices_get_first(devs))
- devs->load_api(devs->load_api_ctx, imgfmt);
+ devs->load_api(devs->load_api_ctx, params);
}
char *hwdec_devices_get_names(struct mp_hwdec_devices *devs)