summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-24 03:21:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-24 03:22:20 +0100
commit721c916dd55b52935140b602a679739ce098760a (patch)
treeb4bfd7b923a0eed055dcb47e15425758907a36a5 /libavcodec/snow.c
parent8f4cbf940212079a34753c7f4d6c6b5a43586d30 (diff)
downloadffmpeg-721c916dd55b52935140b602a679739ce098760a.tar.gz
avcodec/snow: Free all planes and bands independent of the last count
Fixes memleak 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>
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index c4f7004266..07ad854c18 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -718,8 +718,8 @@ av_cold void ff_snow_common_end(SnowContext *s)
av_frame_free(&s->last_picture[i]);
}
- for(plane_index=0; plane_index < s->nb_planes; plane_index++){
- for(level=s->spatial_decomposition_count-1; level>=0; level--){
+ for(plane_index=0; plane_index < MAX_PLANES; plane_index++){
+ for(level=MAX_DECOMPOSITIONS-1; level>=0; level--){
for(orientation=level ? 1 : 0; orientation<4; orientation++){
SubBand *b= &s->plane[plane_index].band[level][orientation];