[FFmpeg-cvslog] avcodec/ljpegenc: fix mem allocation failure return code encode_picture_lossless()
Michael Niedermayer
git at videolan.org
Fri Dec 6 12:11:47 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 6 11:49:17 2013 +0100| [f2d8e3c031247a651f6f0a527bcf669b4553d414] | committer: Michael Niedermayer
avcodec/ljpegenc: fix mem allocation failure return code encode_picture_lossless()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2d8e3c031247a651f6f0a527bcf669b4553d414
---
libavcodec/ljpegenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 9316b11..7e536a8 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -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);
}
}
More information about the ffmpeg-cvslog
mailing list