Commit 39e07ac9 authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Luca Barbato

ansi: check ff_set_dimensions return value

CC: libav-stable@libav.org
Bug-Id: CID 1135737
(cherry picked from commit 994ab180)
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 21aeae9c
...@@ -88,9 +88,11 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -88,9 +88,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->fg = DEFAULT_FG_COLOR; s->fg = DEFAULT_FG_COLOR;
s->bg = DEFAULT_BG_COLOR; s->bg = DEFAULT_BG_COLOR;
if (!avctx->width || !avctx->height) if (!avctx->width || !avctx->height) {
ff_set_dimensions(avctx, 80 << 3, 25 << 4); int ret = ff_set_dimensions(avctx, 80 << 3, 25 << 4);
if (ret < 0)
return ret;
}
return 0; return 0;
} }
......
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