summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSong Bing <b06498@freescale.com>2015-06-12 16:52:46 +0800
committerSebastian Dröge <sebastian@centricular.com>2015-06-23 10:35:46 +0200
commit5109173abfe71b9402eec3fb9140bd76a322cc7a (patch)
treec23cd9a0104c7929758c802876deb490942ba6b8 /gst
parentc1a9a3424de4e6892db0fa5ff031b93502610dca (diff)
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
Diffstat (limited to 'gst')
-rw-r--r--gst/gstpad.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 962f2fdb3..c4e8ff25f 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -4823,6 +4823,14 @@ store_sticky_event (GstPad * pad, GstEvent * event)
|| type == GST_EVENT_EOS))))
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)))
goto eos;
@@ -5317,6 +5325,17 @@ gst_pad_send_event_unchecked (GstPad * pad, GstEvent * event,
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
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 (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
goto eos;