From f6d32199ffa340dbbc4f5cdb2869ea3f30fd2529 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 28 May 2008 19:15:31 +0000 Subject: More ticket #536: fixed bug in SrcUD (missed fix, previously r1968 only fixed SrcUp) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1969 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 51648aea..242844d5 100644 --- a/third_party/resample/src/resamplesubs.c +++ b/third_party/resample/src/resamplesubs.c @@ -307,7 +307,11 @@ static int SrcUD(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 */ v = FilterUD(pImp, pImpD, pNwing, Interp, xp, (RES_HWORD)(time&Pmask), -- cgit v1.2.3