mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
rtpmux: Forward sticky events on buffer lists too, not only on buffers
https://bugzilla.gnome.org/show_bug.cgi?id=764933
This commit is contained in:
parent
1f21747cc5
commit
40fbffc208
1 changed files with 13 additions and 0 deletions
|
@ -420,6 +420,9 @@ process_list_item (GstBuffer ** buffer, guint idx, gpointer user_data)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean resend_events (GstPad * pad, GstEvent ** event,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
|
gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
|
||||||
GstBufferList * bufferlist)
|
GstBufferList * bufferlist)
|
||||||
|
@ -427,6 +430,7 @@ gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
|
||||||
GstRTPMux *rtp_mux;
|
GstRTPMux *rtp_mux;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstRTPMuxPadPrivate *padpriv;
|
GstRTPMuxPadPrivate *padpriv;
|
||||||
|
gboolean changed = FALSE;
|
||||||
struct BufferListData bd;
|
struct BufferListData bd;
|
||||||
|
|
||||||
rtp_mux = GST_RTP_MUX (parent);
|
rtp_mux = GST_RTP_MUX (parent);
|
||||||
|
@ -459,8 +463,17 @@ gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
|
||||||
bufferlist = gst_buffer_list_make_writable (bufferlist);
|
bufferlist = gst_buffer_list_make_writable (bufferlist);
|
||||||
gst_buffer_list_foreach (bufferlist, process_list_item, &bd);
|
gst_buffer_list_foreach (bufferlist, process_list_item, &bd);
|
||||||
|
|
||||||
|
if (!bd.drop && pad != rtp_mux->last_pad) {
|
||||||
|
changed = TRUE;
|
||||||
|
g_clear_object (&rtp_mux->last_pad);
|
||||||
|
rtp_mux->last_pad = g_object_ref (pad);
|
||||||
|
}
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (rtp_mux);
|
GST_OBJECT_UNLOCK (rtp_mux);
|
||||||
|
|
||||||
|
if (changed)
|
||||||
|
gst_pad_sticky_events_foreach (pad, resend_events, rtp_mux);
|
||||||
|
|
||||||
if (bd.drop) {
|
if (bd.drop) {
|
||||||
gst_buffer_list_unref (bufferlist);
|
gst_buffer_list_unref (bufferlist);
|
||||||
ret = GST_FLOW_OK;
|
ret = GST_FLOW_OK;
|
||||||
|
|
Loading…
Reference in a new issue