From 40a1b0066e7e37121518354ed0059f356f5378d1 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Thu, 29 Jun 2023 15:01:54 -0700 Subject: [PATCH] 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. --- video/decode/vd_lavc.c | 4 +--- 1 file changed, 1 insertion(+), 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;