mpdparser: do not dereference profiles is absent
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 11 Sep 2015 09:57:26 +0000 (10:57 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 29 Oct 2015 10:20:45 +0000 (10:20 +0000)
These are used to apply restrictions on what the MPD file may
use, so no profile means no restrictions.

Besides, nothing actually uses the profiles (yet) anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=750869

ext/dash/gstmpdparser.c

index 8fde63e..5fbcd1c 100644 (file)
@@ -3406,7 +3406,11 @@ gst_mpd_client_set_uri_downloader (GstMpdClient * client,
 static void
 gst_mpd_client_check_profiles (GstMpdClient * client)
 {
-  GST_DEBUG ("Profiles: %s", client->mpd_node->profiles);
+  GST_DEBUG ("Profiles: %s",
+      client->mpd_node->profiles ? client->mpd_node->profiles : "<none>");
+
+  if (!client->mpd_node->profiles)
+    return;
 
   if (g_strstr_len (client->mpd_node->profiles, -1,
           "urn:mpeg:dash:profile:isoff-on-demand:2011")) {