diff options
author | Nicolas George <george@nsup.org> | 2013-12-29 10:54:32 +0100 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2013-12-30 10:58:02 +0100 |
commit | 2ebaadf35c9387610ca1eb7e94c171050562a77c (patch) | |
tree | 75a7c8a535a0f159afa77369e1d2a352630e9c35 /libavcodec | |
parent | 19a2d101acc0260bb310e79010a8491b10716189 (diff) | |
download | ffmpeg-2ebaadf35c9387610ca1eb7e94c171050562a77c.tar.gz |
lavc/mjpegenc: use proper error codes.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegenc.c | 6 |
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) |