diff options
author | Paul HENRYS <visechelle@gmail.com> | 2013-01-29 10:48:17 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-02-07 14:38:20 +0100 |
commit | 0e91c949d8105b3650dac499f3e8ed0ba4243d48 (patch) | |
tree | 5baa1c7a752d07e47515732d681ce642299ab269 | |
parent | 7cebe2fc41abb58f17a4e9737bd23e07303df71b (diff) |
rtpptdemux: forward sticky events and then set caps
When a new src pad is added, first forward the sticky events and then
set the caps on the src pad
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692786
-rw-r--r-- | gst/rtpmanager/gstrtpptdemux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpptdemux.c b/gst/rtpmanager/gstrtpptdemux.c index 1dc733097..e0ae78be6 100644 --- a/gst/rtpmanager/gstrtpptdemux.c +++ b/gst/rtpmanager/gstrtpptdemux.c @@ -394,13 +394,16 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) gst_pad_set_active (srcpad, TRUE); + /* First sticky events on sink pad are forwarded to the new src pad */ + gst_pad_sticky_events_foreach (rtpdemux->sink, forward_sticky_events, + srcpad); + + /* Then caps event is sent */ caps = gst_caps_make_writable (caps); gst_caps_set_simple (caps, "payload", G_TYPE_INT, pt, NULL); gst_pad_set_caps (srcpad, caps); gst_caps_unref (caps); - gst_pad_sticky_events_foreach (rtpdemux->sink, forward_sticky_events, - srcpad); gst_element_add_pad (GST_ELEMENT_CAST (rtpdemux), srcpad); GST_DEBUG ("emitting new-payload-type for pt %d", pt); |