diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 21:18:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 21:30:08 +0100 |
commit | dd369c9adbdd6b5bb306db15dce9ad8d370385fc (patch) | |
tree | e6e03d703ddba4cc30b15275844ed05df0720c7e | |
parent | 6d66e1a1136d7a720f370556852c8b5ed0abdfea (diff) | |
download | ffmpeg-dd369c9adbdd6b5bb306db15dce9ad8d370385fc.tar.gz |
avcodec/snow: Initialize spatial_decomposition_count to a valid value
Fixes undefined behavior
Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/snow.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 07ad854c18..101c8f83e5 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -434,6 +434,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ s->avctx= avctx; s->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe + s->spatial_decomposition_count = 1; ff_me_cmp_init(&s->mecc, avctx); ff_hpeldsp_init(&s->hdsp, avctx->flags); |