mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
pad: Clear EOS flag after received STREAM_START event
Clear EOS flag after received STREAM_START event https://bugzilla.gnome.org/show_bug.cgi?id=750761
This commit is contained in:
parent
c1a9a3424d
commit
5109173abf
1 changed files with 19 additions and 0 deletions
19
gst/gstpad.c
19
gst/gstpad.c
|
@ -4823,6 +4823,14 @@ store_sticky_event (GstPad * pad, GstEvent * event)
|
||||||
|| type == GST_EVENT_EOS))))
|
|| type == GST_EVENT_EOS))))
|
||||||
goto flushed;
|
goto flushed;
|
||||||
|
|
||||||
|
/* Unset the EOS flag when received STREAM_START event, so pad can
|
||||||
|
* store sticky event and then push it later */
|
||||||
|
if (type == GST_EVENT_STREAM_START) {
|
||||||
|
GST_LOG_OBJECT (pad, "Removing pending EOS events");
|
||||||
|
remove_event_by_type (pad, GST_EVENT_EOS);
|
||||||
|
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
|
||||||
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
|
if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
|
||||||
goto eos;
|
goto eos;
|
||||||
|
|
||||||
|
@ -5317,6 +5325,17 @@ gst_pad_send_event_unchecked (GstPad * pad, GstEvent * event,
|
||||||
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
|
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
|
||||||
goto flushing;
|
goto flushing;
|
||||||
|
|
||||||
|
switch (event_type) {
|
||||||
|
case GST_EVENT_STREAM_START:
|
||||||
|
/* Remove sticky EOS events */
|
||||||
|
GST_LOG_OBJECT (pad, "Removing pending EOS events");
|
||||||
|
remove_event_by_type (pad, GST_EVENT_EOS);
|
||||||
|
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (serialized) {
|
if (serialized) {
|
||||||
if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
|
if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
|
||||||
goto eos;
|
goto eos;
|
||||||
|
|
Loading…
Reference in a new issue