mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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>
This commit is contained in:
parent
426a6ea644
commit
25c66e6004
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue