Browse Source

Merge commit '39e07ac9fcaf3d412f9a33f427072e8ded032d24' into release/2.4

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.7
Michael Niedermayer 11 years ago
parent
commit
baef2736b0
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      libavcodec/ansi.c

+ 5
- 3
libavcodec/ansi.c 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;
}



Loading…
Cancel
Save