diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2015-06-11 10:53:30 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-06-11 11:03:18 +0200 |
commit | 25c66e60045e44d50a591f5d62706f6f243bb9ca (patch) | |
tree | 01e9437b54c26a351a8eebd83988099cdd72df41 /plugins | |
parent | 426a6ea6444e37422acb45b4b19e3165bf419b55 (diff) |
concat: Reset segment base offset after FLUSH_STOP with reset_time = TRUE
If the reset_time value of a FLUSH_STOP event is set to TRUE, the pipeline
will have the base_time of its elements reset. This means that the concat
element's current_start_offset has to be reset to 0, since it was
calculated with the old base-time in mind.
Only FLUSH_STOP events coming from the active pad are looked at.
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstconcat.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/elements/gstconcat.c b/plugins/elements/gstconcat.c index 63358bf44..75890f204 100644 --- a/plugins/elements/gstconcat.c +++ b/plugins/elements/gstconcat.c @@ -523,9 +523,16 @@ gst_concat_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) g_mutex_lock (&self->lock); forward = (self->current_sinkpad == GST_PAD_CAST (spad)); g_mutex_unlock (&self->lock); - if (forward) + if (forward) { + gboolean reset_time; + gst_event_parse_flush_stop (event, &reset_time); + if (reset_time) { + GST_DEBUG_OBJECT (self, + "resetting start offset to 0 after flushing with reset_time = TRUE"); + self->current_start_offset = 0; + } ret = gst_pad_event_default (pad, parent, event); - else + } else gst_event_unref (event); break; } |