mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 12:50:19 +00:00
cuda: move --cuda-device to cuda_opts group
Also change a ta_free to talloc_free for consistency reasons.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user