[FFmpeg-cvslog] avcodec/ffv1dec: Test extradata_size instead of extradata for better robustness
Michael Niedermayer
git at videolan.org
Fri Jul 22 02:00:48 EEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 21 23:37:02 2016 +0200| [697b2bbd54d0c8bceadb7cb09d2412aaf7660601] | committer: Michael Niedermayer
avcodec/ffv1dec: Test extradata_size instead of extradata for better robustness
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=697b2bbd54d0c8bceadb7cb09d2412aaf7660601
---
libavcodec/ffv1dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6a932b2..1e67fd3 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)
More information about the ffmpeg-cvslog
mailing list