mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
svq1enc: check ff_get_buffer() return value
Fixes CID747723 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1818a1130d
commit
7effc26ba7
@ -547,8 +547,10 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!s->current_picture.data[0]) {
|
if (!s->current_picture.data[0]) {
|
||||||
ff_get_buffer(avctx, &s->current_picture);
|
if ((ret = ff_get_buffer(avctx, &s->current_picture) < 0) ||
|
||||||
ff_get_buffer(avctx, &s->last_picture);
|
(ret = ff_get_buffer(avctx, &s->last_picture)) < 0) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
|
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user