diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-13 14:51:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-13 14:51:37 +0100 |
commit | 057b74d19c0f1493b3aff14439648a9122128f1a (patch) | |
tree | 5bceeb9f889df2adc208e2b508022a1bb6ad0d8b | |
parent | 04f6a5230db8e3f86ec7137f87eb68c8b3ce9959 (diff) | |
parent | 994ab1804b8bf532f44876927b07b51f1f63247f (diff) | |
download | ffmpeg-057b74d19c0f1493b3aff14439648a9122128f1a.tar.gz |
Merge commit '994ab1804b8bf532f44876927b07b51f1f63247f'
* commit '994ab1804b8bf532f44876927b07b51f1f63247f':
ansi: check ff_set_dimensions return value
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ansi.c | 8 |
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; } |