summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2023-06-29 15:01:54 -0700
committerPhilip Langdale <philipl@overt.org>2023-06-29 15:03:05 -0700
commit40a1b0066e7e37121518354ed0059f356f5378d1 (patch)
tree12e8e091ef4267b6a24cdb51f931be09291f5d35 /video/decode
parent9ff8c9e78020bcda19f3435ed88ebd6a302d2cc2 (diff)
downloadmpv-40a1b0066e7e37121518354ed0059f356f5378d1.tar.bz2
mpv-40a1b0066e7e37121518354ed0059f356f5378d1.tar.xz
vd_lavc: do inline string array initialisation for hwdec_api
I couldn't work out the correct syntax, but NRK0 pointed out an example of where we'd done it elsewhere in the codebase.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index d8dc3daa73..1f0a9163e6 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -101,8 +101,6 @@ static const struct m_opt_choice_alternatives discard_names[] = {
};
#define OPT_DISCARD(field) OPT_CHOICE_C(field, discard_names)
-static char *default_hwdec_api[] = { "no", NULL, };
-
const struct m_sub_options vd_lavc_conf = {
.opts = (const m_option_t[]){
{"vd-lavc-fast", OPT_BOOL(fast)},
@@ -140,7 +138,7 @@ const struct m_sub_options vd_lavc_conf = {
.skip_frame = AVDISCARD_DEFAULT,
.framedrop = AVDISCARD_NONREF,
.dr = -1,
- .hwdec_api = default_hwdec_api,
+ .hwdec_api = (char *[]){"no", NULL,},
.hwdec_codecs = "h264,vc1,hevc,vp8,vp9,av1,prores",
// Maximum number of surfaces the player wants to buffer. This number
// might require adjustment depending on whatever the player does;