diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 636ca72050..e7e18af92d 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1800,7 +1800,7 @@ static int validate_float_option(float v, const float *v_list, int v_list_size) break; } if (i == v_list_size) - return -1; + return AVERROR(EINVAL); return i; }