GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
GSList *streams = gst_mss_manifest_get_streams (mssdemux->manifest);
GSList *iter;
+ GSList *active_streams = NULL;
if (streams == NULL) {
GST_INFO_OBJECT (mssdemux, "No streams found in the manifest");
return FALSE;
}
- GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %u",
- demux->connection_speed);
- gst_mss_manifest_change_bitrate (mssdemux->manifest, demux->connection_speed);
-
+ GST_INFO_OBJECT (mssdemux, "Activating streams");
for (iter = streams; iter; iter = g_slist_next (iter)) {
GstPad *srcpad = NULL;
GstMssDemuxStream *stream = NULL;
GstMssStream *manifeststream = iter->data;
- GstCaps *caps;
- const gchar *lang;
srcpad = _create_pad (mssdemux, manifeststream);
srcpad);
stream->manifest_stream = manifeststream;
gst_mss_stream_set_active (manifeststream, TRUE);
+ active_streams = g_slist_prepend (active_streams, stream);
+ }
+
+ GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %u",
+ demux->connection_speed);
+ gst_mss_manifest_change_bitrate (mssdemux->manifest, demux->connection_speed);
+
+ for (iter = active_streams; iter; iter = g_slist_next (iter)) {
+ GstMssDemuxStream *stream = iter->data;
+ GstCaps *caps;
+ const gchar *lang;
+
caps = gst_mss_stream_get_caps (stream->manifest_stream);
gst_adaptive_demux_stream_set_caps (GST_ADAPTIVE_DEMUX_STREAM_CAST (stream),
create_mss_caps (stream, caps));
}
}
+ g_slist_free (active_streams);
return TRUE;
}