mjpeg: return proper error code
authorNidhi Makhijani <nidhimj22@gmail.com>
Mon, 21 Jul 2014 07:11:46 +0000 (12:41 +0530)
committerDiego Biurrun <diego@biurrun.de>
Mon, 21 Jul 2014 08:25:33 +0000 (01:25 -0700)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavcodec/mjpegenc.c

index 9ce07de..fdb882e 100644 (file)
@@ -46,7 +46,7 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
 
     m = av_malloc(sizeof(MJpegContext));
     if (!m)
-        return -1;
+        return AVERROR(ENOMEM);
 
     s->min_qcoeff=-1023;
     s->max_qcoeff= 1023;