[FFmpeg-cvslog] avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()
Michael Niedermayer
git at videolan.org
Fri Oct 16 03:36:36 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Oct 16 03:24:36 2015 +0200| [d6f6e98eb1581e1153ff4d87996bfb4f5c61d9dc] | committer: Michael Niedermayer
avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6f6e98eb1581e1153ff4d87996bfb4f5c61d9dc
---
libavutil/crc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/crc.c b/libavutil/crc.c
index e432843..5a1ddf0 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) {
More information about the ffmpeg-cvslog
mailing list