diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-06-12 14:24:27 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-06-12 16:01:56 +0200 |
commit | 36d034d1e4b7611be61cae80526ff0a7b18cebdb (patch) | |
tree | 798318015330c56ec9238c9e0b033ccbcfa9e798 | |
parent | 92d5fb8660c950a41e3d477e889bba3455ae6d6d (diff) |
basesrc: handle flush events on the element as well
Handle flush-start and flush-stop sent on the element as well and send them
downstream. Make sure to send a segment event after the flush stop.
-rw-r--r-- | libs/gst/base/gstbasesrc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 2d99fd39b..e034580b6 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -1675,9 +1675,19 @@ gst_base_src_send_event (GstElement * element, GstEvent * event) switch (GST_EVENT_TYPE (event)) { /* bidirectional events */ case GST_EVENT_FLUSH_START: + GST_DEBUG_OBJECT (src, "pushing flush-start event downstream"); + result = gst_pad_push_event (src->srcpad, event); + event = NULL; + break; case GST_EVENT_FLUSH_STOP: + GST_LIVE_LOCK (src->srcpad); + src->priv->segment_pending = TRUE; /* sending random flushes downstream can break stuff, * especially sync since all segment info will get flushed */ + GST_DEBUG_OBJECT (src, "pushing flush-stop event downstream"); + result = gst_pad_push_event (src->srcpad, event); + GST_LIVE_UNLOCK (src->srcpad); + event = NULL; break; /* downstream serialized events */ |