From a1f4e7ea4d857f087313e8c105c8af6625dc0645 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 28 May 2008 17:26:30 +0000 Subject: Reapplied changeset 287 (resample may write pass the output buffer), with a bit optimization git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1968 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/resample/src/resamplesubs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'third_party') diff --git a/third_party/resample/src/resamplesubs.c b/third_party/resample/src/resamplesubs.c index 2cb04eb5..51648aea 100644 --- a/third_party/resample/src/resamplesubs.c +++ b/third_party/resample/src/resamplesubs.c @@ -259,7 +259,11 @@ static int SrcUp(const RES_HWORD X[], RES_HWORD Y[], double pFactor, Ystart = Y; Yend = Ystart + (unsigned)(nx * pFactor); endTime = time + (1< 0), + // so it may cause resample write pass the output buffer (Y >= Yend). + // while (time < endTime) + while (Y < Yend) { xp = &X[time>>Np]; /* Ptr to current input sample */ /* Perform left-wing inner product */ -- cgit v1.2.3