mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
audiomixer: Set the sinkpad segments basetime after seeking
Otherwise stream offset and running time comparison will not be correct, leading to segfaults after seeks
This commit is contained in:
parent
183f4b3227
commit
c158e019c1
2 changed files with 4 additions and 0 deletions
|
@ -706,6 +706,8 @@ gst_audiomixer_src_event (GstAggregator * agg, GstEvent * event)
|
|||
/* Link up */
|
||||
result = GST_AGGREGATOR_CLASS (parent_class)->src_event (agg, event);
|
||||
|
||||
if (result)
|
||||
audiomixer->base_time = agg->segment.start;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
@ -1131,6 +1133,7 @@ gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad,
|
|||
guint64 start_running_time_offset;
|
||||
guint64 end_running_time_offset;
|
||||
|
||||
aggpad->segment.base = audiomixer->base_time;
|
||||
start_running_time =
|
||||
gst_segment_to_running_time (&aggpad->segment,
|
||||
GST_FORMAT_TIME, start_time);
|
||||
|
|
|
@ -71,6 +71,7 @@ struct _GstAudioMixer {
|
|||
|
||||
/* Last time we noticed a discont */
|
||||
GstClockTime discont_time;
|
||||
gint64 base_time;
|
||||
|
||||
/* Size in samples that is output per buffer */
|
||||
guint blocksize;
|
||||
|
|
Loading…
Reference in a new issue