summaryrefslogtreecommitdiff
path: root/ext/pango
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2013-01-31 15:38:18 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-09-05 11:08:04 +0300
commitef5823cc9b0b825a8ca96eab02712d31db57a41d (patch)
tree732088ee2020e718d48ad7786d49578fb346f95d /ext/pango
parent501a295fa12436ffd2f1abc7105b007ecc9f950a (diff)
downloadgstreamer-plugins-base-ef5823cc9b0b825a8ca96eab02712d31db57a41d.tar.gz
basetextoverlay: just forward the seek event to sink pads like other events
https://bugzilla.gnome.org/show_bug.cgi?id=735844
Diffstat (limited to 'ext/pango')
-rw-r--r--ext/pango/gstbasetextoverlay.c57
1 files changed, 8 insertions, 49 deletions
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
index 5e4b270c7..41c66754a 100644
--- a/ext/pango/gstbasetextoverlay.c
+++ b/ext/pango/gstbasetextoverlay.c
@@ -1084,60 +1084,19 @@ static gboolean
gst_base_text_overlay_src_event (GstPad * pad, GstObject * parent,
GstEvent * event)
{
- gboolean ret = FALSE;
- GstBaseTextOverlay *overlay = NULL;
+ GstBaseTextOverlay *overlay;
+ gboolean ret;
overlay = GST_BASE_TEXT_OVERLAY (parent);
- switch (GST_EVENT_TYPE (event)) {
- case GST_EVENT_SEEK:{
- GstSeekFlags flags;
-
- /* We don't handle seek if we have not text pad */
- if (!overlay->text_linked) {
- GST_DEBUG_OBJECT (overlay, "seek received, pushing upstream");
- ret = gst_pad_push_event (overlay->video_sinkpad, event);
- goto beach;
- }
-
- GST_DEBUG_OBJECT (overlay, "seek received, driving from here");
-
- gst_event_parse_seek (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL);
-
- /* Flush downstream, only for flushing seek */
- if (flags & GST_SEEK_FLAG_FLUSH)
- gst_pad_push_event (overlay->srcpad, gst_event_new_flush_start ());
-
- /* Mark ourself as flushing, unblock chains */
- GST_BASE_TEXT_OVERLAY_LOCK (overlay);
- overlay->video_flushing = TRUE;
- overlay->text_flushing = TRUE;
- gst_base_text_overlay_pop_text (overlay);
- GST_BASE_TEXT_OVERLAY_UNLOCK (overlay);
-
- /* Seek on each sink pad */
- gst_event_ref (event);
- ret = gst_pad_push_event (overlay->video_sinkpad, event);
- if (ret) {
- ret = gst_pad_push_event (overlay->text_sinkpad, event);
- } else {
- gst_event_unref (event);
- }
- break;
- }
- default:
- if (overlay->text_linked) {
- gst_event_ref (event);
- ret = gst_pad_push_event (overlay->video_sinkpad, event);
- gst_pad_push_event (overlay->text_sinkpad, event);
- } else {
- ret = gst_pad_push_event (overlay->video_sinkpad, event);
- }
- break;
+ if (overlay->text_linked) {
+ gst_event_ref (event);
+ ret = gst_pad_push_event (overlay->video_sinkpad, event);
+ gst_pad_push_event (overlay->text_sinkpad, event);
+ } else {
+ ret = gst_pad_push_event (overlay->video_sinkpad, event);
}
-beach:
-
return ret;
}