mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +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 */
|
/* Link up */
|
||||||
result = GST_AGGREGATOR_CLASS (parent_class)->src_event (agg, event);
|
result = GST_AGGREGATOR_CLASS (parent_class)->src_event (agg, event);
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
audiomixer->base_time = agg->segment.start;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1131,6 +1133,7 @@ gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad,
|
||||||
guint64 start_running_time_offset;
|
guint64 start_running_time_offset;
|
||||||
guint64 end_running_time_offset;
|
guint64 end_running_time_offset;
|
||||||
|
|
||||||
|
aggpad->segment.base = audiomixer->base_time;
|
||||||
start_running_time =
|
start_running_time =
|
||||||
gst_segment_to_running_time (&aggpad->segment,
|
gst_segment_to_running_time (&aggpad->segment,
|
||||||
GST_FORMAT_TIME, start_time);
|
GST_FORMAT_TIME, start_time);
|
||||||
|
|
|
@ -71,6 +71,7 @@ struct _GstAudioMixer {
|
||||||
|
|
||||||
/* Last time we noticed a discont */
|
/* Last time we noticed a discont */
|
||||||
GstClockTime discont_time;
|
GstClockTime discont_time;
|
||||||
|
gint64 base_time;
|
||||||
|
|
||||||
/* Size in samples that is output per buffer */
|
/* Size in samples that is output per buffer */
|
||||||
guint blocksize;
|
guint blocksize;
|
||||||
|
|
Loading…
Reference in a new issue