summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2014-07-21 11:07:19 +0200
committerThibault Saunier <tsaunier@gnome.org>2014-10-06 18:57:28 +0200
commit27b8d981c74338cc63a1c4fa143b3c371eddcdd7 (patch)
treeff755f17b0e574f40225aa2267f44a866e063c99 /gst
parentdd65d70f65c72a8d5cfc5560787ead90f4982b66 (diff)
downloadgstreamer-plugins-bad-27b8d981c74338cc63a1c4fa143b3c371eddcdd7.tar.gz
audiomixer: Set the sinkpad segments basetime after seeking
Otherwise stream offset and running time comparison will not be correct, leading to segfaults after seeks
Diffstat (limited to 'gst')
-rw-r--r--gst/audiomixer/gstaudiomixer.c3
-rw-r--r--gst/audiomixer/gstaudiomixer.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c
index d95b91e0f..ef0b21c90 100644
--- a/gst/audiomixer/gstaudiomixer.c
+++ b/gst/audiomixer/gstaudiomixer.c
@@ -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);
diff --git a/gst/audiomixer/gstaudiomixer.h b/gst/audiomixer/gstaudiomixer.h
index 6433ea1a4..f5db18ffe 100644
--- a/gst/audiomixer/gstaudiomixer.h
+++ b/gst/audiomixer/gstaudiomixer.h
@@ -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;