Browse Source

video_get_buffer: return ENOMEM instead of -1 on malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
93d672967d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/utils.c

+ 2
- 1
libavcodec/utils.c View File

@@ -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


Loading…
Cancel
Save