From b04bf11c423466e9a49f6d44c73d65b86f822208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Sun, 17 Jul 2022 17:37:33 +0200 Subject: [PATCH] api: Do not set default user-agent string Similarly as with other properties, we should aim to make this into user config option. For the time being remove, as our outdated default user-agent seems to be breaking few HLS streaming services. --- lib/gst/clapper/gstclapper.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/gst/clapper/gstclapper.c b/lib/gst/clapper/gstclapper.c index f39322a4..ae7f65ca 100644 --- a/lib/gst/clapper/gstclapper.c +++ b/lib/gst/clapper/gstclapper.c @@ -3166,26 +3166,16 @@ static void element_setup_cb (GstElement * playbin, GstElement * element, GstClapper * self) { GstElementFactory *factory; - GParamSpec *prop; - factory = gst_element_get_factory (element); - if (factory) { + if ((factory = gst_element_get_factory (element))) { gchar *plugin_name = gst_object_get_name (GST_OBJECT_CAST (factory)); if (plugin_name) { GST_INFO_OBJECT (self, "Plugin setup: %s", plugin_name); /* TODO: Set plugin props */ + + g_free (plugin_name); } - g_free (plugin_name); - } - - prop = g_object_class_find_property (G_OBJECT_GET_CLASS (element), "user-agent"); - if (prop && prop->value_type == G_TYPE_STRING) { - const gchar *user_agent = - "Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"; - - GST_INFO_OBJECT (self, "Setting element user-agent: %s", user_agent); - g_object_set (element, "user-agent", user_agent, NULL); } }