mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 13:36:39 +00:00
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.
This commit is contained in:
parent
3c9ae895b0
commit
195e54e06a
1 changed files with 2 additions and 4 deletions
|
@ -973,22 +973,20 @@ static gboolean
|
||||||
gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad,
|
gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad,
|
||||||
GstBuffer * inbuf)
|
GstBuffer * inbuf)
|
||||||
{
|
{
|
||||||
|
GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
|
||||||
GstClockTime start_time, end_time;
|
GstClockTime start_time, end_time;
|
||||||
gboolean discont = FALSE;
|
gboolean discont = FALSE;
|
||||||
guint64 start_offset, end_offset;
|
guint64 start_offset, end_offset;
|
||||||
GstClockTime timestamp, stream_time;
|
GstClockTime timestamp, stream_time;
|
||||||
gint rate, bpf;
|
gint rate, bpf;
|
||||||
|
|
||||||
GstAggregator *agg = GST_AGGREGATOR (audiomixer);
|
|
||||||
GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
|
|
||||||
|
|
||||||
g_assert (pad->buffer == NULL);
|
g_assert (pad->buffer == NULL);
|
||||||
|
|
||||||
rate = GST_AUDIO_INFO_RATE (&audiomixer->info);
|
rate = GST_AUDIO_INFO_RATE (&audiomixer->info);
|
||||||
bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
|
bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
|
||||||
|
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (inbuf);
|
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);
|
timestamp);
|
||||||
|
|
||||||
/* sync object properties on stream time */
|
/* sync object properties on stream time */
|
||||||
|
|
Loading…
Reference in a new issue