audioresample: On the first buffer we need discont handling
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 21 Aug 2009 08:00:49 +0000 (10:00 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 26 Aug 2009 07:10:18 +0000 (09:10 +0200)
Otherwise we won't get upstream timestamps and everything and all
output buffers would have -1 timestamps.

gst/audioresample/gstaudioresample.c

index 13db12a..2421208 100644 (file)
@@ -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;