mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
pad: Set the event source object if none is set yet in gst_pad_push_event()
Otherwise the source will stay at NULL, the event is passed to the peerpad via gst_pad_send_event() and then the peerpad is set as source of the event instead of the originating pad.
This commit is contained in:
parent
6720373610
commit
f2f7842f6b
1 changed files with 5 additions and 0 deletions
|
@ -4954,6 +4954,11 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (GST_EVENT_SRC (event) == NULL)) {
|
||||
GST_LOG_OBJECT (pad, "event had no source, setting pad as event source");
|
||||
GST_EVENT_SRC (event) = gst_object_ref (pad);
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (GST_PAD_DO_EVENT_SIGNALS (pad) > 0)) {
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
|
|
Loading…
Reference in a new issue