diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-04 00:47:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-04 00:47:18 +0200 |
commit | 93d672967d05f9769bbeb2ac6ceb8cbde302c273 (patch) | |
tree | 5711cb2afad02fb3e124c11fe6d66c46ff7ea3b9 /libavcodec/utils.c | |
parent | f339ebc1ff0d5db9df156f3bb9b8584568bb5b9d (diff) | |
download | ffmpeg-93d672967d05f9769bbeb2ac6ceb8cbde302c273.tar.gz |
video_get_buffer: return ENOMEM instead of -1 on malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 668965a237..b3af77d2d0 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -508,7 +508,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) buf->linesize[i]= picture.linesize[i]; buf->base[i]= av_malloc(size[i]+16); //FIXME 16 - if(buf->base[i]==NULL) return -1; + if(buf->base[i]==NULL) + return AVERROR(ENOMEM); memset(buf->base[i], 128, size[i]); // no edge if EDGE EMU or not planar YUV |