From 2e585ac7ac1d28b1f63d13a17c37c35916514a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 21 Aug 2009 10:00:49 +0200 Subject: [PATCH] audioresample: On the first buffer we need discont handling Otherwise we won't get upstream timestamps and everything and all output buffers would have -1 timestamps. --- gst/audioresample/gstaudioresample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index 13db12a8df..2421208e71 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -223,8 +223,6 @@ gst_audio_resample_init (GstAudioResample * resample, resample->quality = SPEEX_RESAMPLER_QUALITY_DEFAULT; - resample->need_discont = FALSE; - gst_pad_set_query_function (trans->srcpad, gst_audio_resample_query); gst_pad_set_query_type_function (trans->srcpad, gst_audio_resample_query_type); @@ -236,6 +234,8 @@ gst_audio_resample_start (GstBaseTransform * base) { GstAudioResample *resample = GST_AUDIO_RESAMPLE (base); + resample->need_discont = TRUE; + resample->t0 = GST_CLOCK_TIME_NONE; resample->in_offset0 = GST_BUFFER_OFFSET_NONE; resample->out_offset0 = GST_BUFFER_OFFSET_NONE;