diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-19 18:12:42 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-22 14:20:38 +0000 |
commit | db12a2f224239f1b2c1f58dc1feed9a1f4c8e553 (patch) | |
tree | 6cb5c0540a7d9064359d85ee39b3c079dc7d3c6c /options/options.c | |
parent | 73ad9eef2875247d38af99f4d8c804f2749a8588 (diff) | |
download | mpv-db12a2f224239f1b2c1f58dc1feed9a1f4c8e553.tar.bz2 mpv-db12a2f224239f1b2c1f58dc1feed9a1f4c8e553.tar.xz |
cuda: move --cuda-device to cuda_opts group
Also change a ta_free to talloc_free for consistency reasons.
Diffstat (limited to 'options/options.c')
-rw-r--r-- | options/options.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/options/options.c b/options/options.c index d91a72c3a3..507b4b6067 100644 --- a/options/options.c +++ b/options/options.c @@ -364,6 +364,21 @@ const struct m_sub_options mp_osd_render_sub_opts = { }; #undef OPT_BASE_STRUCT +#define OPT_BASE_STRUCT struct cuda_opts + +const struct m_sub_options cuda_conf = { + .opts = (const struct m_option[]){ + {"decode-device", OPT_CHOICE(cuda_device, {"auto", -1}), + M_RANGE(0, INT_MAX)}, + {0} + }, + .size = sizeof(struct cuda_opts), + .defaults = &(const struct cuda_opts){ + .cuda_device = -1, + }, +}; + +#undef OPT_BASE_STRUCT #define OPT_BASE_STRUCT struct dvd_opts const struct m_sub_options dvd_conf = { @@ -845,8 +860,7 @@ static const m_option_t mp_opts[] = { #endif #if HAVE_CUDA_HWACCEL - {"cuda-decode-device", OPT_CHOICE(cuda_device, {"auto", -1}), - M_RANGE(0, INT_MAX)}, + {"cuda", OPT_SUBSTRUCT(cuda_opts, cuda_conf)}, #endif #if HAVE_VAAPI |