From: Mark Nauwelaerts Date: Mon, 13 Dec 2010 09:05:00 +0000 (+0100) Subject: audioresample: relax discont checking slightly X-Git-Tag: RELEASE-0.10.32~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93d68ec77d4b4c6d670168488c00cbc274a71fe4;p=platform%2Fupstream%2Fgst-plugins-base.git audioresample: relax discont checking slightly --- diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index 1b6c990..42597e4 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -957,8 +957,10 @@ gst_audio_resample_check_discont (GstAudioResample * resample, GstBuffer * buf) /* many elements generate imperfect streams due to rounding errors, so we * permit a small error (up to one sample) without triggering a filter * flush/restart (if triggered incorrectly, this will be audible) */ + /* allow even up to more samples, since sink is not so strict anyway, + * so give that one a chance to handle this as configured */ delta = ABS ((gint64) (offset - resample->samples_in)); - if (delta <= 1) + if (delta <= (resample->inrate >> 5)) return FALSE; GST_WARNING_OBJECT (resample,