summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2013-05-14 16:37:16 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2013-05-16 15:00:39 -0300
commit62860f4fa9b071f710c50ad97f6e0ee4c71fda88 (patch)
tree49530231cf4f5830aa837cce458819b892bc7f1a
parent220f075423b38303a53d9cb96fe4ea55addbd5d9 (diff)
downloadgstreamer-plugins-bad-62860f4fa9b071f710c50ad97f6e0ee4c71fda88.tar.gz
mssdemux: send stream id and newsegment before pushing data
Fixes sticky events ordering warnings when data is pushed https://bugzilla.gnome.org/show_bug.cgi?id=699924
-rw-r--r--ext/smoothstreaming/gstmssdemux.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
index b2fb671d3..9e39d29af 100644
--- a/ext/smoothstreaming/gstmssdemux.c
+++ b/ext/smoothstreaming/gstmssdemux.c
@@ -817,16 +817,27 @@ gst_mss_demux_expose_stream (GstMssDemux * mssdemux, GstMssDemuxStream * stream)
media_caps = gst_mss_stream_get_caps (stream->manifest_stream);
if (media_caps) {
+ gchar *name = gst_pad_get_name (pad);
+ gchar *stream_id;
gst_pad_set_active (pad, TRUE);
caps = create_mss_caps (stream, media_caps);
gst_caps_unref (media_caps);
+
+ stream_id =
+ gst_pad_create_stream_id (pad, GST_ELEMENT_CAST (mssdemux), name);
+ gst_pad_push_event (pad, gst_event_new_stream_start (stream_id));
+ g_free (stream_id);
+ g_free (name);
+
gst_pad_set_caps (pad, caps);
stream->caps = caps;
GST_INFO_OBJECT (mssdemux, "Adding srcpad %s:%s with caps %" GST_PTR_FORMAT,
GST_DEBUG_PAD_NAME (pad), caps);
gst_object_ref (pad);
+
+ stream->pending_newsegment = gst_event_new_segment (&mssdemux->segment);
gst_element_add_pad (GST_ELEMENT_CAST (mssdemux), pad);
} else {
GST_WARNING_OBJECT (mssdemux,