Commit 856834a7 authored by Michael Niedermayer's avatar Michael Niedermayer

ffv1: change w/h asserts to check as the condition can likely happen

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5709e201
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment