- g_object_set (G_OBJECT (source), "user-agent", _this->m_useragent.c_str(), NULL);
- gst_object_unref(source);
+ if (source)
+ {
+#if GST_VERSION_MAJOR >= 1
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(source), "ssl-strict") != 0)
+ {
+ g_object_set(G_OBJECT(source), "ssl-strict", FALSE, NULL);
+ }
+#endif
+ g_object_set (G_OBJECT (source), "user-agent", _this->m_useragent.c_str(), NULL);
+ gst_object_unref(source);
+ }