avcodec/sgienc: return meaningful error code
authorPaul B Mahol <onemda@gmail.com>
Mon, 9 Feb 2015 14:05:13 +0000 (14:05 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 9 Feb 2015 14:07:54 +0000 (14:07 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/sgienc.c

index 21026af..2f45eb3 100644 (file)
@@ -153,7 +153,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
         /* Make an intermediate consecutive buffer. */
         if (!(encode_buf = av_malloc(width)))
-            return -1;
+            return AVERROR(ENOMEM);
 
         for (z = 0; z < depth; z++) {
             in_buf = p->data[0] + p->linesize[0] * (height - 1) + z;