Skip to content
Snippets Groups Projects
Commit d6f6e98e authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()

parent c980c5e5
No related branches found
No related tags found
No related merge requests found
...@@ -312,9 +312,9 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) ...@@ -312,9 +312,9 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
uint32_t c; uint32_t c;
if (bits < 8 || bits > 32 || poly >= (1LL << bits)) if (bits < 8 || bits > 32 || poly >= (1LL << bits))
return -1; return AVERROR(EINVAL);
if (ctx_size != sizeof(AVCRC) * 257 && ctx_size != sizeof(AVCRC) * 1024) if (ctx_size != sizeof(AVCRC) * 257 && ctx_size != sizeof(AVCRC) * 1024)
return -1; return AVERROR(EINVAL);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
if (le) { if (le) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment