changeset 11943:3f5b35e5f4de libavcodec

vp6: convert VLA to fixed size
author mru
date Thu, 24 Jun 2010 09:02:44 +0000
parents ce4b71c171aa
children 052b9c58ccc4
files vp6.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vp6.c	Thu Jun 24 08:53:32 2010 +0000
+++ b/vp6.c	Thu Jun 24 09:02:44 2010 +0000
@@ -36,6 +36,7 @@
 #include "vp56data.h"
 #include "vp6data.h"
 
+#define VP6_MAX_HUFF_SIZE 12
 
 static void vp6_parse_coeff(VP56Context *s);
 static void vp6_parse_coeff_huffman(VP56Context *s);
@@ -215,7 +216,7 @@
 static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
                                 const uint8_t *map, unsigned size, VLC *vlc)
 {
-    Node nodes[2*size], *tmp = &nodes[size];
+    Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size];
     int a, b, i;
 
     /* first compute probabilities from model */