avcodec/ac3enc: Use specific error code in validate_float_option()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 17:39:55 +0000 (18:39 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ac3enc.c

index 636ca72..e7e18af 100644 (file)
@@ -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;
 }