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:
Seungha Yang 2022-11-27 00:26:22 +09:00 committed by GStreamer Marge Bot
parent 61c17c5665
commit bd8ef7ae3a

View file

@ -268,7 +268,7 @@ gst_proxy_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
if (sticky) if (sticky)
gst_proxy_sink_send_sticky_events (self, pad, srcpad); 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 (srcpad);
gst_object_unref (src); gst_object_unref (src);
@ -288,10 +288,25 @@ gst_proxy_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
ret = TRUE; ret = TRUE;
} }
} else { } else {
gst_event_unref (event);
ret = TRUE; 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; return ret;
} }