[FFmpeg-cvslog] avcodec/sgienc: return meaningful error code

Paul B Mahol git at videolan.org
Mon Feb 9 15:20:07 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Feb  9 14:05:13 2015 +0000| [238247b622912019243b7abcd016cc4a0f5d3b6d] | committer: Paul B Mahol

avcodec/sgienc: return meaningful error code

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=238247b622912019243b7abcd016cc4a0f5d3b6d
---

 libavcodec/sgienc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 21026af..2f45eb3 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -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;



More information about the ffmpeg-cvslog mailing list