Commit 697b2bbd authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ffv1dec: Test extradata_size instead of extradata for better robustness

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 38cc5c29
......@@ -881,7 +881,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
if ((ret = ff_ffv1_common_init(avctx)) < 0)
return ret;
if (avctx->extradata && (ret = read_extra_header(f)) < 0)
if (avctx->extradata_size > 0 && (ret = read_extra_header(f)) < 0)
return ret;
if ((ret = ff_ffv1_init_slice_contexts(f)) < 0)
......
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