gst-full: Fix detection of duplicate plugin entries

Just because a plugin name is a substring of another plugin, doesn't
mean it is the same plugin. If the list of plugins can contain
a filename, that will be a static lib of the form libgstfoo.a

For example, if you had `-p applemedia -e app:appsrc,appsink` then
`applemedia` would be removed from the plugins list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9442>
This commit is contained in:
Nirbheek Chauhan 2025-07-25 06:55:54 +05:30 committed by GStreamer Marge Bot
parent 32e6b47b07
commit 81bdef0150

View File

@ -48,12 +48,12 @@ gst_init_static_plugins (void)
''')
# Retrieve the plugin name as it can be a plugin filename
# Retrieve the plugin name as it can be a plugin filename
def get_plugin_name(name):
for p in plugins:
if name in p:
return p
return ''
if name in plugins or f'libgst{name}.a' in plugins:
return name
return None
def process_features(features_list, plugins, feature_prefix):
@ -66,7 +66,7 @@ def process_features(features_list, plugins, feature_prefix):
split = plugin.split(':')
plugin_name = split[0].strip()
if len(split) == 2:
if (get_plugin_name(plugin_name)) != '':
if get_plugin_name(plugin_name) is not None:
plugins_list.remove(get_plugin_name(plugin_name))
features = split[1].split(',')
for feature in features: