[FFmpeg-cvslog] avcodec/ac3enc: Use specific error code in validate_float_option()

Michael Niedermayer git at videolan.org
Wed Jan 2 01:23:51 EET 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Dec 31 18:39:55 2018 +0100| [c6db2e97dcd246234b958814450d3fd12a5c8c27] | committer: Michael Niedermayer

avcodec/ac3enc: Use specific error code in validate_float_option()

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6db2e97dcd246234b958814450d3fd12a5c8c27
---

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



More information about the ffmpeg-cvslog mailing list