From dc61d27b5e6b321067e38cb830ead225ae0b9829 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Mon, 1 Feb 2010 11:23:54 +0000 Subject: Ticket #766: - Applied patch provided by Bram Kuijvenhoven related to truncation issue in floating-point to integer type-casts in pjmedia components. - Original patch proposal and description can be found here: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2010-January/010258.html. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3085 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/resample/src/resamplesubs.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'third_party') diff --git a/third_party/resample/src/resamplesubs.c b/third_party/resample/src/resamplesubs.c index 242844d5..23f2f252 100644 --- a/third_party/resample/src/resamplesubs.c +++ b/third_party/resample/src/resamplesubs.c @@ -118,9 +118,13 @@ static int dtb = dt*(1< 0), + // so it may cause resample write pass the output buffer (Y >= Yend). + // while (time < endTime) + while (Y < Yend) { iconst = (time) & Pmask; xp = &X[(time)>>Np]; /* Ptr to current input sample */ @@ -257,7 +261,7 @@ static int SrcUp(const RES_HWORD X[], RES_HWORD Y[], double pFactor, dtb = dt*(1< 0), @@ -305,7 +309,7 @@ static int SrcUD(const RES_HWORD X[], RES_HWORD Y[], double pFactor, dhb = dh*(1< 0), -- cgit v1.2.3