You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
video_get_buffer: return ENOMEM instead of -1 on malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -508,7 +508,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
|
|||||||
buf->linesize[i]= picture.linesize[i];
|
buf->linesize[i]= picture.linesize[i];
|
||||||
|
|
||||||
buf->base[i]= av_malloc(size[i]+16); //FIXME 16
|
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]);
|
memset(buf->base[i], 128, size[i]);
|
||||||
|
|
||||||
// no edge if EDGE EMU or not planar YUV
|
// no edge if EDGE EMU or not planar YUV
|
||||||
|
Reference in New Issue
Block a user