mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
multipartdemux: Ensure caps before pad added.
This stores the stream-start, sets caps, and then adds the pad, which ensures that the caps are set for the "pad-added" callback. https://bugzilla.gnome.org/show_bug.cgi?id=735626
This commit is contained in:
parent
356defdfea
commit
bcbdcbf638
1 changed files with 2 additions and 2 deletions
|
@ -322,7 +322,6 @@ gst_multipart_find_pad_by_mime (GstMultipartDemux * demux, gchar * mime,
|
|||
|
||||
gst_pad_use_fixed_caps (pad);
|
||||
gst_pad_set_active (pad, TRUE);
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (demux), pad);
|
||||
|
||||
/* prepare and send stream-start */
|
||||
if (!demux->have_group_id) {
|
||||
|
@ -346,7 +345,7 @@ gst_multipart_find_pad_by_mime (GstMultipartDemux * demux, gchar * mime,
|
|||
if (demux->have_group_id)
|
||||
gst_event_set_group_id (event, demux->group_id);
|
||||
|
||||
gst_pad_push_event (pad, event);
|
||||
gst_pad_store_sticky_event (pad, event);
|
||||
g_free (stream_id);
|
||||
|
||||
/* take the mime type, convert it to the caps name */
|
||||
|
@ -354,6 +353,7 @@ gst_multipart_find_pad_by_mime (GstMultipartDemux * demux, gchar * mime,
|
|||
caps = gst_caps_from_string (capsname);
|
||||
GST_DEBUG_OBJECT (demux, "caps for pad: %s", capsname);
|
||||
gst_pad_set_caps (pad, caps);
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (demux), pad);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
if (created) {
|
||||
|
|
Loading…
Reference in a new issue