mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
ansi: check ff_set_dimensions return value
CC: libav-stable@libav.org
Bug-Id: CID 1135737
(cherry picked from commit 994ab1804b
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
21aeae9c67
commit
39e07ac9fc
@ -88,9 +88,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
s->fg = DEFAULT_FG_COLOR;
|
||||
s->bg = DEFAULT_BG_COLOR;
|
||||
|
||||
if (!avctx->width || !avctx->height)
|
||||
ff_set_dimensions(avctx, 80 << 3, 25 << 4);
|
||||
|
||||
if (!avctx->width || !avctx->height) {
|
||||
int ret = ff_set_dimensions(avctx, 80 << 3, 25 << 4);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user