From 1f93dd7d3780cacd0b422b327e519a5c5e2bbd1b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 7 Mar 2025 21:34:16 +0100 Subject: [PATCH] meson: simplify video-codecs option parsing The extra `all_free` that now remains in the list will be ignored in the loop below anyway so there is no need to have complex code to try to remove it. This also means it becomes possible to set things like `-D video-codecs=all_free,vc1dec`. Part-of: --- meson.build | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 4766ce838ba..c71643458cd 100644 --- a/meson.build +++ b/meson.build @@ -386,13 +386,7 @@ all_codecs = patent_codecs + free_codecs if _codecs.contains('all') _codecs = all_codecs elif _codecs.contains('all_free') - selected_codecs = _codecs - _codecs = free_codecs - foreach c : patent_codecs - if selected_codecs.contains(c) - _codecs += c - endif - endforeach + _codecs += free_codecs endif foreach c : all_codecs pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())