[FFmpeg-devel] [PATCH 08/16] avcodec/ac3enc: Use specific error code in validate_float_option()

Michael Niedermayer michael at niedermayer.cc
Mon Dec 31 20:22:38 EET 2018


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/ac3enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
-- 
2.20.1



More information about the ffmpeg-devel mailing list