avcodec/ljpegenc: fix mem allocation failure return code encode_picture_lossless()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-06 11:49:17 +01:00
parent 0f057ea3c5
commit f2d8e3c031
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt,
s->rd_scratchpad = av_mallocz(alloc_size * 4 * 16 * 2);
if (!s->rd_scratchpad) {
av_log(avctx, AV_LOG_ERROR, "failed to allocate context scratch buffers.\n");
return ret;
return AVERROR(ENOMEM);
}
}