summaryrefslogtreecommitdiff
path: root/libavutil/crc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-10-16 03:24:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-16 03:24:36 +0200
commitd6f6e98eb1581e1153ff4d87996bfb4f5c61d9dc (patch)
tree1a58c2544bd39f6581e8eb743b82b4c5c30127bd /libavutil/crc.c
parentc980c5e54dfe83ce8b631845ce750c38cec56873 (diff)
downloadffmpeg-d6f6e98eb1581e1153ff4d87996bfb4f5c61d9dc.tar.gz
avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/crc.c')
-rw-r--r--libavutil/crc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/crc.c b/libavutil/crc.c
index e432843dfd..5a1ddf092b 100644
--- a/libavutil/crc.c
+++ b/libavutil/crc.c
@@ -312,9 +312,9 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
uint32_t c;
if (bits < 8 || bits > 32 || poly >= (1LL << bits))
- return -1;
+ return AVERROR(EINVAL);
if (ctx_size != sizeof(AVCRC) * 257 && ctx_size != sizeof(AVCRC) * 1024)
- return -1;
+ return AVERROR(EINVAL);
for (i = 0; i < 256; i++) {
if (le) {