[FFmpeg-cvslog] lavu/slicethread: return ENOSYS rather than EINVAL in the dummy func

Anton Khirnov git at videolan.org
Sun Aug 29 19:50:10 EEST 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jul  7 16:43:03 2021 +0200| [fdc0bb78feb7a4684dd958d2538a0974c12b12cd] | committer: Anton Khirnov

lavu/slicethread: return ENOSYS rather than EINVAL in the dummy func

EINVAL is the wrong error code here, since the arguments passed to the
function are valid. The error is that the function is not implemented in
the build, which corresponds to ENOSYS.

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

 libavutil/slicethread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/slicethread.c b/libavutil/slicethread.c
index f928a5cf00..867ce32238 100644
--- a/libavutil/slicethread.c
+++ b/libavutil/slicethread.c
@@ -240,7 +240,7 @@ int avpriv_slicethread_create(AVSliceThread **pctx, void *priv,
                               int nb_threads)
 {
     *pctx = NULL;
-    return AVERROR(EINVAL);
+    return AVERROR(ENOSYS);
 }
 
 void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main)



More information about the ffmpeg-cvslog mailing list