/* make HTTP sources send extra headers so we get icecast
* metadata in case the stream is an icecast stream */
- if (!strncmp (decoder->uri, "http://", 7) &&
- g_object_class_find_property (source_class, "iradio-mode")) {
- GST_LOG_OBJECT (decoder, "configuring iradio-mode");
- g_object_set (source, "iradio-mode", TRUE, NULL);
+ if (!strncmp (decoder->uri, "http://", 7)) {
+ pspec = g_object_class_find_property (source_class, "iradio-mode");
+
+ if (pspec && G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING) {
+ GST_LOG_OBJECT (decoder, "configuring iradio-mode");
+ g_object_set (source, "iradio-mode", TRUE, NULL);
+ }
}
pspec = g_object_class_find_property (source_class, "connection-speed");
{
GObjectClass *source_class = NULL;
gboolean is_live = FALSE;
+ GParamSpec *pspec;
source_class = G_OBJECT_GET_CLASS (source);
- if (!g_object_class_find_property (source_class, "is-live"))
+ pspec = g_object_class_find_property (source_class, "is-live");
+ if (!pspec || G_PARAM_SPEC_VALUE_TYPE (pspec) != G_TYPE_BOOLEAN)
return FALSE;
g_object_get (G_OBJECT (source), "is-live", &is_live, NULL);