Commit 93d67296 authored by Michael Niedermayer's avatar Michael Niedermayer

video_get_buffer: return ENOMEM instead of -1 on malloc failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f339ebc1
......@@ -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
......
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