mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -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;
|
GstBus *bus;
|
||||||
GList *devices;
|
GList *devices;
|
||||||
gchar **providers;
|
gchar **providers;
|
||||||
gchar *provided;
|
|
||||||
PinosProperties *props;
|
PinosProperties *props;
|
||||||
|
|
||||||
disable_pinos_provider (manager);
|
disable_pinos_provider (manager);
|
||||||
|
|
@ -200,15 +199,18 @@ start_monitor (PinosGstManager *manager)
|
||||||
gst_device_monitor_start (priv->monitor);
|
gst_device_monitor_start (priv->monitor);
|
||||||
|
|
||||||
providers = gst_device_monitor_get_providers (priv->monitor);
|
providers = gst_device_monitor_get_providers (priv->monitor);
|
||||||
provided = g_strjoinv (",", providers);
|
if (providers != NULL) {
|
||||||
g_strfreev (providers);
|
gchar *provided;
|
||||||
|
|
||||||
g_object_get (priv->daemon, "properties", &props, NULL);
|
provided = g_strjoinv (",", providers);
|
||||||
pinos_properties_set (props, "gstreamer.deviceproviders", provided);
|
g_strfreev (providers);
|
||||||
g_object_set (priv->daemon, "properties", props, NULL);
|
|
||||||
pinos_properties_free (props);
|
|
||||||
|
|
||||||
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);
|
devices = gst_device_monitor_get_devices (priv->monitor);
|
||||||
while (devices != NULL) {
|
while (devices != NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue