mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pinos/modules/gst/gst-manager: Don't pass around NULL
gst_device_monitor_get_providers() will return NULL in case there are no available providers.
This commit is contained in:
parent
5ae6da69e6
commit
9a6c52737a
1 changed files with 10 additions and 8 deletions
|
|
@ -183,7 +183,6 @@ start_monitor (PinosGstManager *manager)
|
|||
GstBus *bus;
|
||||
GList *devices;
|
||||
gchar **providers;
|
||||
gchar *provided;
|
||||
PinosProperties *props;
|
||||
|
||||
disable_pinos_provider (manager);
|
||||
|
|
@ -200,15 +199,18 @@ start_monitor (PinosGstManager *manager)
|
|||
gst_device_monitor_start (priv->monitor);
|
||||
|
||||
providers = gst_device_monitor_get_providers (priv->monitor);
|
||||
provided = g_strjoinv (",", providers);
|
||||
g_strfreev (providers);
|
||||
if (providers != NULL) {
|
||||
gchar *provided;
|
||||
|
||||
g_object_get (priv->daemon, "properties", &props, NULL);
|
||||
pinos_properties_set (props, "gstreamer.deviceproviders", provided);
|
||||
g_object_set (priv->daemon, "properties", props, NULL);
|
||||
pinos_properties_free (props);
|
||||
provided = g_strjoinv (",", providers);
|
||||
g_strfreev (providers);
|
||||
|
||||
g_free (provided);
|
||||
g_object_get (priv->daemon, "properties", &props, NULL);
|
||||
pinos_properties_set (props, "gstreamer.deviceproviders", provided);
|
||||
g_object_set (priv->daemon, "properties", props, NULL);
|
||||
pinos_properties_free (props);
|
||||
g_free (provided);
|
||||
}
|
||||
|
||||
devices = gst_device_monitor_get_devices (priv->monitor);
|
||||
while (devices != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue