diff options
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 1959a0efcf..ef58665a17 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -266,11 +266,11 @@ int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx) return 0; } -int ff_parse_sample_rate(unsigned *ret, const char *arg, void *log_ctx) +int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx) { char *tail; double srate = av_strtod(arg, &tail); - if (*tail || srate < 1 || (int)srate != srate) { + if (*tail || srate < 1 || (int)srate != srate || srate > INT_MAX) { av_log(log_ctx, AV_LOG_ERROR, "Invalid sample rate '%s'\n", arg); return AVERROR(EINVAL); } |