Browse code

vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>

Dustin Brody authored on 2011/08/17 05:46:34
Showing 1 changed files
... ...
@@ -215,8 +215,8 @@ static int vp6_huff_cmp(const void *va, const void *vb)
215 215
     return (a->count - b->count)*16 + (b->sym - a->sym);
216 216
 }
217 217
 
218
-static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
219
-                                const uint8_t *map, unsigned size, VLC *vlc)
218
+static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
219
+                               const uint8_t *map, unsigned size, VLC *vlc)
220 220
 {
221 221
     Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size];
222 222
     int a, b, i;
... ...
@@ -231,9 +231,9 @@ static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
231 231
     }
232 232
 
233 233
     free_vlc(vlc);
234
-    /* then build the huffman tree accodring to probabilities */
235
-    ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
236
-                       FF_HUFFMAN_FLAG_HNODE_FIRST);
234
+    /* then build the huffman tree according to probabilities */
235
+    return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
236
+                              FF_HUFFMAN_FLAG_HNODE_FIRST);
237 237
 }
238 238
 
239 239
 static void vp6_parse_coeff_models(VP56Context *s)