diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-07-21 23:37:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-07-21 23:37:02 +0200 |
commit | 697b2bbd54d0c8bceadb7cb09d2412aaf7660601 (patch) | |
tree | a2ade7282bcc775dd97f1868f5185af48895a148 | |
parent | 38cc5c298c988950d2bfa0d16408f07ee7be7f3c (diff) | |
download | ffmpeg-697b2bbd54d0c8bceadb7cb09d2412aaf7660601.tar.gz |
avcodec/ffv1dec: Test extradata_size instead of extradata for better robustness
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ffv1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 6a932b2934..1e67fd39e9 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -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) |