cuda: move --cuda-device to cuda_opts group

Also change a ta_free to talloc_free for consistency reasons.
This commit is contained in:
Dudemanguy
2023-09-19 18:12:42 -05:00
parent 73ad9eef28
commit db12a2f224
4 changed files with 32 additions and 12 deletions

View File

@@ -363,6 +363,21 @@ const struct m_sub_options mp_osd_render_sub_opts = {
.change_flags = UPDATE_OSD,
};
#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
@@ -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