Merge commit '39e07ac9fcaf3d412f9a33f427072e8ded032d24' into release/2.4

* commit '39e07ac9fcaf3d412f9a33f427072e8ded032d24':
  ansi: check ff_set_dimensions return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-18 02:57:48 +01:00
commit baef2736b0

View File

@ -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;
}