Browse Source

svq1enc: check ff_get_buffer return value

CC: libav-stable@libav.org
Bug-Id: CID 747723
(cherry picked from commit 59846452af)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.4.7
Vittorio Giovara Luca Barbato 11 years ago
parent
commit
21aeae9c67
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavcodec/svq1enc.c

+ 6
- 2
libavcodec/svq1enc.c View File

@@ -580,8 +580,12 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}

if (!s->current_picture->data[0]) {
ff_get_buffer(avctx, s->current_picture, 0);
ff_get_buffer(avctx, s->last_picture, 0);
ret = ff_get_buffer(avctx, s->current_picture, 0);
if (ret < 0)
return ret;
ret = ff_get_buffer(avctx, s->last_picture, 0);
if (ret < 0)
return ret;
s->scratchbuf = av_malloc(s->current_picture->linesize[0] * 16 * 2);
}



Loading…
Cancel
Save