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>
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;
}