diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2015-02-12 11:26:44 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2015-02-12 11:41:10 +0000 |
commit | 5230b2354f8860097e9d8fc3e131be829a1452a0 (patch) | |
tree | 74f228b8f91cff6828a822470cf0986f7484b7eb /gst/audiomixer | |
parent | 31f59cb344fc8fc1347092fedfdbcd0ca6c80f0f (diff) | |
download | gstreamer-plugins-bad-5230b2354f8860097e9d8fc3e131be829a1452a0.tar.gz |
audiomixer: calculate stream_time used to sync pad values correctly
Use pad (input) segment to calculate the stream time from the
input timestamp, not the aggregator (output) segment.
Diffstat (limited to 'gst/audiomixer')
-rw-r--r-- | gst/audiomixer/gstaudiomixer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c index a58ef74f9..f48e268b6 100644 --- a/gst/audiomixer/gstaudiomixer.c +++ b/gst/audiomixer/gstaudiomixer.c @@ -973,22 +973,20 @@ static gboolean gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad, GstBuffer * inbuf) { + GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad); GstClockTime start_time, end_time; gboolean discont = FALSE; guint64 start_offset, end_offset; GstClockTime timestamp, stream_time; gint rate, bpf; - GstAggregator *agg = GST_AGGREGATOR (audiomixer); - GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad); - g_assert (pad->buffer == NULL); rate = GST_AUDIO_INFO_RATE (&audiomixer->info); bpf = GST_AUDIO_INFO_BPF (&audiomixer->info); timestamp = GST_BUFFER_TIMESTAMP (inbuf); - stream_time = gst_segment_to_stream_time (&agg->segment, GST_FORMAT_TIME, + stream_time = gst_segment_to_stream_time (&aggpad->segment, GST_FORMAT_TIME, timestamp); /* sync object properties on stream time */ |