aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-12 11:13:06 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-01-13 00:16:41 +0100
commit39e07ac9fcaf3d412f9a33f427072e8ded032d24 (patch)
treeb9ad47e820e1f186d716337a8d709b1a651c8406 /libavcodec
parent21aeae9c679657a1537d0d9127eff280bafc901a (diff)
downloadffmpeg-39e07ac9fcaf3d412f9a33f427072e8ded032d24.tar.gz
ansi: check ff_set_dimensions return value
CC: libav-stable@libav.org Bug-Id: CID 1135737 (cherry picked from commit 994ab1804b8bf532f44876927b07b51f1f63247f) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ansi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 95b5be4678..556bfe4461 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -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;
}