Commit f2d8e3c0 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0f057ea3
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment