Browse Source

svq1enc: check ff_get_buffer return value

CC: libav-stable@libav.org
Bug-Id: CID 747723
tags/n2.5
Vittorio Giovara 11 years ago
parent
commit
59846452af
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