aboutsummaryrefslogtreecommitdiff
path: root/libswresample/resample.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-02-04 03:25:07 +0100
committerMichael Niedermayer2013-02-04 04:05:59 +0100
commit91debec976d2535e402c8f6326e70589a2776a38 (patch)
tree7cb3c7a034f168349759310c43e9a323634f4d3a /libswresample/resample.c
parentcf7b71b0b812ba5d2b5f0a307b9a427a3db4df0a (diff)
swr/resample: fix filter rounding and cliping for s32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r--libswresample/resample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index d3fe1a7479..fb9da7c354 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -142,7 +142,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
break;
case AV_SAMPLE_FMT_S32P:
for(i=0;i<tap_count;i++)
- ((int32_t*)filter)[ph * alloc + i] = av_clip(lrintf(tab[i] * scale / norm), INT32_MIN, INT32_MAX);
+ ((int32_t*)filter)[ph * alloc + i] = av_clipl_int32(llrint(tab[i] * scale / norm));
break;
case AV_SAMPLE_FMT_FLTP:
for(i=0;i<tap_count;i++)