summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-01-27 04:54:52 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-01-27 04:54:52 (GMT)
commit167af704ea3df1073cf16073ae6e4ffadcb06764 (patch)
tree4437e2e0cee116ef7263a6dae363861c759d0e55
parentb16830840eb9bdec88fce2aebb38a582e093ab6b (diff)
downloadffmpeg-167af704ea3df1073cf16073ae6e4ffadcb06764.zip
ffmpeg-167af704ea3df1073cf16073ae6e4ffadcb06764.tar.gz
ffmpeg-167af704ea3df1073cf16073ae6e4ffadcb06764.tar.bz2
swr: limit phase_shift to a less insane value.
This prevents potential crashes and out of memory issues if the user manually sets such insane values. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libswresample/swresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 3387ea3..e55f9be 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -88,7 +88,7 @@ static const AVOption options[]={
{"improved_e_weighted" , "select improved-e-weighted noise shaping dither" , 0 , AV_OPT_TYPE_CONST, {.i64=SWR_DITHER_NS_IMPROVED_E_WEIGHTED }, INT_MIN, INT_MAX, PARAM, "dither_method"},
{"filter_size" , "set swr resampling filter size", OFFSET(filter_size) , AV_OPT_TYPE_INT , {.i64=32 }, 0 , INT_MAX , PARAM },
-{"phase_shift" , "set swr resampling phase shift", OFFSET(phase_shift) , AV_OPT_TYPE_INT , {.i64=10 }, 0 , 30 , PARAM },
+{"phase_shift" , "set swr resampling phase shift", OFFSET(phase_shift) , AV_OPT_TYPE_INT , {.i64=10 }, 0 , 24 , PARAM },
{"linear_interp" , "enable linear interpolation" , OFFSET(linear_interp) , AV_OPT_TYPE_INT , {.i64=0 }, 0 , 1 , PARAM },
{"cutoff" , "set cutoff frequency ratio" , OFFSET(cutoff) , AV_OPT_TYPE_DOUBLE,{.dbl=0. }, 0 , 1 , PARAM },
{"resampler" , "set resampling Engine" , OFFSET(engine) , AV_OPT_TYPE_INT , {.i64=0 }, 0 , SWR_ENGINE_NB-1, PARAM, "resampler"},