summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2015-01-18 02:57:48 +0100
committerMichael Niedermayer <[email protected]>2015-01-18 02:57:48 +0100
commitbaef2736b07dcb55d8acff945ee61e619691f1a0 (patch)
treeb4a2e43cee426c58e252ade9ed77d6b3aff7bb82
parent65b2973a543366fe398e9f376fa0ec0bda030b0a (diff)
parent39e07ac9fcaf3d412f9a33f427072e8ded032d24 (diff)
Merge commit '39e07ac9fcaf3d412f9a33f427072e8ded032d24' into release/2.4
* commit '39e07ac9fcaf3d412f9a33f427072e8ded032d24': ansi: check ff_set_dimensions return value Merged-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavcodec/ansi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 45c307f317..92981cc62e 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -90,9 +90,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;
}