Commit 7effc26b authored by Michael Niedermayer's avatar Michael Niedermayer

svq1enc: check ff_get_buffer() return value

Fixes CID747723
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1818a113
......@@ -547,8 +547,10 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
if (!s->current_picture.data[0]) {
ff_get_buffer(avctx, &s->current_picture);
ff_get_buffer(avctx, &s->last_picture);
if ((ret = ff_get_buffer(avctx, &s->current_picture) < 0) ||
(ret = ff_get_buffer(avctx, &s->last_picture)) < 0) {
return ret;
}
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
}
......
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