diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2014-11-26 15:41:37 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2014-11-27 19:10:58 +0100 |
commit | 31679e56bb4065580ab3e904ecfc856f4d878a0a (patch) | |
tree | e713d16378546ef664b4cd46c85fef795d4b17dd /gst/debugutils | |
parent | eb24d9d6077dc35b8f9517811bba5ba1cb070338 (diff) | |
download | gstreamer-plugins-bad-31679e56bb4065580ab3e904ecfc856f4d878a0a.tar.gz |
watchdog: Handle FLUSHING seek events even in PAUSED state
https://bugzilla.gnome.org/show_bug.cgi?id=740757
Diffstat (limited to 'gst/debugutils')
-rw-r--r-- | gst/debugutils/gstwatchdog.c | 20 | ||||
-rw-r--r-- | gst/debugutils/gstwatchdog.h | 2 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gst/debugutils/gstwatchdog.c b/gst/debugutils/gstwatchdog.c index 1a30ed1f6..fe48448ad 100644 --- a/gst/debugutils/gstwatchdog.c +++ b/gst/debugutils/gstwatchdog.c @@ -211,7 +211,23 @@ static void gst_watchdog_feed (GstWatchdog * watchdog, gpointer mini_object, gboolean force) { if (watchdog->source) { - if (watchdog->waiting_for_a_buffer) { + if (watchdog->waiting_for_flush_start) { + if (mini_object && GST_IS_EVENT (mini_object) && + GST_EVENT_TYPE (mini_object) == GST_EVENT_FLUSH_START) { + watchdog->waiting_for_flush_start = FALSE; + watchdog->waiting_for_flush_stop = TRUE; + } + + force = TRUE; + } else if (watchdog->waiting_for_flush_stop) { + if (mini_object && GST_IS_EVENT (mini_object) && + GST_EVENT_TYPE (mini_object) == GST_EVENT_FLUSH_STOP) { + watchdog->waiting_for_flush_stop = FALSE; + watchdog->waiting_for_a_buffer = TRUE; + } + + force = TRUE; + } else if (watchdog->waiting_for_a_buffer) { if (mini_object && GST_IS_BUFFER (mini_object)) { watchdog->waiting_for_a_buffer = FALSE; GST_DEBUG_OBJECT (watchdog, "Got a buffer \\o/"); @@ -330,7 +346,7 @@ gst_watchdog_src_event (GstBaseTransform * trans, GstEvent * event) if (flags & GST_SEEK_FLAG_FLUSH) { force = TRUE; GST_DEBUG_OBJECT (watchdog, "Got a FLUSHING seek, we need a buffer now!"); - watchdog->waiting_for_a_buffer = TRUE; + watchdog->waiting_for_flush_start = TRUE; } } diff --git a/gst/debugutils/gstwatchdog.h b/gst/debugutils/gstwatchdog.h index c146c66db..b296e0f1f 100644 --- a/gst/debugutils/gstwatchdog.h +++ b/gst/debugutils/gstwatchdog.h @@ -47,6 +47,8 @@ struct _GstWatchdog GSource *source; gboolean waiting_for_a_buffer; + gboolean waiting_for_flush_start; + gboolean waiting_for_flush_stop; }; struct _GstWatchdogClass |