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
This commit is contained in:
parent
220f075423
commit
62860f4fa9
@ -817,16 +817,27 @@ gst_mss_demux_expose_stream (GstMssDemux * mssdemux, GstMssDemuxStream * stream)
|
|||||||
media_caps = gst_mss_stream_get_caps (stream->manifest_stream);
|
media_caps = gst_mss_stream_get_caps (stream->manifest_stream);
|
||||||
|
|
||||||
if (media_caps) {
|
if (media_caps) {
|
||||||
|
gchar *name = gst_pad_get_name (pad);
|
||||||
|
gchar *stream_id;
|
||||||
gst_pad_set_active (pad, TRUE);
|
gst_pad_set_active (pad, TRUE);
|
||||||
|
|
||||||
caps = create_mss_caps (stream, media_caps);
|
caps = create_mss_caps (stream, media_caps);
|
||||||
gst_caps_unref (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);
|
gst_pad_set_caps (pad, caps);
|
||||||
stream->caps = caps;
|
stream->caps = caps;
|
||||||
|
|
||||||
GST_INFO_OBJECT (mssdemux, "Adding srcpad %s:%s with caps %" GST_PTR_FORMAT,
|
GST_INFO_OBJECT (mssdemux, "Adding srcpad %s:%s with caps %" GST_PTR_FORMAT,
|
||||||
GST_DEBUG_PAD_NAME (pad), caps);
|
GST_DEBUG_PAD_NAME (pad), caps);
|
||||||
gst_object_ref (pad);
|
gst_object_ref (pad);
|
||||||
|
|
||||||
|
stream->pending_newsegment = gst_event_new_segment (&mssdemux->segment);
|
||||||
gst_element_add_pad (GST_ELEMENT_CAST (mssdemux), pad);
|
gst_element_add_pad (GST_ELEMENT_CAST (mssdemux), pad);
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING_OBJECT (mssdemux,
|
GST_WARNING_OBJECT (mssdemux,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user