diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-11-23 18:56:09 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-11-24 09:05:01 -0500 |
commit | 99cb833fc2d9874c62fffbcd3347fae660de0fe5 (patch) | |
tree | 3ba4707143e76ea076fb85eafa1d4b16650d6996 /libavcodec/sgienc.c | |
parent | 823fa7004571cb8404ca5785f9fa6e85f0f9f3d3 (diff) | |
download | ffmpeg-99cb833fc2d9874c62fffbcd3347fae660de0fe5.tar.gz |
sgi: Correctly propagate meaningful error values
Diffstat (limited to 'libavcodec/sgienc.c')
-rw-r--r-- | libavcodec/sgienc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index c5e66cd087..2da4f51d44 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -193,7 +193,7 @@ FF_ENABLE_DEPRECATION_WARNINGS /* Make an intermediate consecutive buffer. */ if (!(encode_buf = av_malloc(width * bytes_per_channel))) - return -1; + return AVERROR(ENOMEM); for (z = 0; z < depth; z++) { in_buf = p->data[0] + p->linesize[0] * (height - 1) + z * bytes_per_channel; @@ -208,7 +208,7 @@ FF_ENABLE_DEPRECATION_WARNINGS bytes_per_channel); if (length < 1) { av_free(encode_buf); - return -1; + return AVERROR_INVALIDDATA; } bytestream2_put_be32(&tablen_pcb, length); |