mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
proxysink: Post EOS message on EOS event
proxysink is actual sink (GST_ELEMENT_FLAG_SINK flag has configured) so it should post EOS message. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3472>
This commit is contained in:
parent
61c17c5665
commit
bd8ef7ae3a
1 changed files with 17 additions and 2 deletions
|
@ -268,7 +268,7 @@ gst_proxy_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
if (sticky)
|
||||
gst_proxy_sink_send_sticky_events (self, pad, srcpad);
|
||||
|
||||
ret = gst_pad_push_event (srcpad, event);
|
||||
ret = gst_pad_push_event (srcpad, gst_event_ref (event));
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (src);
|
||||
|
||||
|
@ -288,10 +288,25 @@ gst_proxy_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
ret = TRUE;
|
||||
}
|
||||
} else {
|
||||
gst_event_unref (event);
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_EOS:
|
||||
{
|
||||
GstMessage *msg = gst_message_new_eos (GST_OBJECT_CAST (self));
|
||||
guint32 seq_num = gst_event_get_seqnum (event);
|
||||
|
||||
gst_message_set_seqnum (msg, seq_num);
|
||||
gst_element_post_message (GST_ELEMENT_CAST (self), msg);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue