dashdemux: only generate index segment uri if there is a template
authorThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 3 Jul 2013 13:16:29 +0000 (10:16 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 3 Jul 2013 13:23:45 +0000 (10:23 -0300)
Simple fix to avoid an assertion.

ext/dash/gstmpdparser.c

index 4491e1d..319325c 100644 (file)
@@ -3762,9 +3762,10 @@ gst_mpd_client_get_next_header_index (GstMpdClient * client, gchar ** uri,
         && stream_period->period->SegmentTemplate->index) {
       initialization = stream_period->period->SegmentTemplate->index;
     }
-    *uri = gst_mpdparser_build_URL_from_template (initialization,
-        stream->cur_representation->id, 0,
-        stream->cur_representation->bandwidth, 0);
+    if (initialization)
+      *uri = gst_mpdparser_build_URL_from_template (initialization,
+          stream->cur_representation->id, 0,
+          stream->cur_representation->bandwidth, 0);
   }
   GST_MPD_CLIENT_UNLOCK (client);