Browse Source

ansi: check ff_set_dimensions return value

CC: libav-stable@libav.org
Bug-Id: CID 1135737
tags/n2.5
Vittorio Giovara 10 years ago
parent
commit
994ab1804b
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      libavcodec/ansi.c

+ 5
- 3
libavcodec/ansi.c View File

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



Loading…
Cancel
Save