[FFmpeg-devel] [PATCH 3/3] avutil/camellia: use EINVAL instead of -1 for the return code of av_camellia_init()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 18 02:07:00 CEST 2015


Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavutil/camellia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/camellia.c b/libavutil/camellia.c
index 483eed2..f21ca12 100644
--- a/libavutil/camellia.c
+++ b/libavutil/camellia.c
@@ -354,7 +354,7 @@ av_cold int av_camellia_init(AVCAMELLIA *cs, const uint8_t *key, int key_bits)
     uint64_t Kl[2], Kr[2], Ka[2], Kb[2];
     uint64_t D1, D2;
     if (key_bits != 128 && key_bits != 192 && key_bits != 256)
-        return -1;
+        return AVERROR(EINVAL);
     memset(Kb, 0, sizeof(Kb));
     memset(Kr, 0, sizeof(Kr));
     cs->key_bits = key_bits;
-- 
2.6.1



More information about the ffmpeg-devel mailing list