From 856834a77f4145adc5951e8b08984981fed4463d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 6 Oct 2012 03:12:25 +0200 Subject: ffv1: change w/h asserts to check as the condition can likely happen Signed-off-by: Michael Niedermayer --- libavcodec/ffv1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/ffv1.c') diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index f946122dfb..5ce8e7aa20 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -700,6 +700,9 @@ static void write_header(FFV1Context *f){ static av_cold int common_init(AVCodecContext *avctx){ FFV1Context *s = avctx->priv_data; + if(!avctx->width || !avctx->height) + return AVERROR_INVALIDDATA; + s->avctx= avctx; s->flags= avctx->flags; @@ -710,7 +713,6 @@ static av_cold int common_init(AVCodecContext *avctx){ s->width = avctx->width; s->height= avctx->height; - assert(s->width && s->height); //defaults s->num_h_slices=1; s->num_v_slices=1; -- cgit v1.2.3