aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-12-29 10:54:32 +0100
committerNicolas George <george@nsup.org>2013-12-30 10:58:02 +0100
commit2ebaadf35c9387610ca1eb7e94c171050562a77c (patch)
tree75a7c8a535a0f159afa77369e1d2a352630e9c35 /libavcodec
parent19a2d101acc0260bb310e79010a8491b10716189 (diff)
downloadffmpeg-2ebaadf35c9387610ca1eb7e94c171050562a77c.tar.gz
lavc/mjpegenc: use proper error codes.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mjpegenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 7837ce975e..518a7d56a4 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -48,12 +48,12 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
if (s->width > 65500 || s->height > 65500) {
av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n");
- return -1;
+ return AVERROR(EINVAL);
}
m = av_malloc(sizeof(MJpegContext));
if (!m)
- return -1;
+ return AVERROR(ENOMEM);
s->min_qcoeff=-1023;
s->max_qcoeff= 1023;
@@ -545,7 +545,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
//CODEC_FLAG_EMU_EDGE have to be cleared
if(s->avctx->flags & CODEC_FLAG_EMU_EDGE)
- return -1;
+ return AVERROR(EINVAL);
pic = av_frame_alloc();
if (!pic)