]> git.sesse.net Git - ffmpeg/commitdiff
fraps: increase vlc nb_bits
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Sep 2015 12:22:18 +0000 (14:22 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 3 Sep 2015 11:55:38 +0000 (13:55 +0200)
Sample-Id: fraps_bug_huff.avi
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/fraps.c

index bd330a3b4e8a381f298afaa407d8bb26f9393d95..eb61c70c49005ab2df272992a6e33a0bd36f8aca 100644 (file)
@@ -39,6 +39,7 @@
 #include "internal.h"
 
 #define FPS_TAG MKTAG('F', 'P', 'S', 'x')
+#define VLC_BITS 11
 
 /**
  * local variable storage
@@ -100,7 +101,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
     for (i = 0; i < 256; i++)
         nodes[i].count = bytestream_get_le32(&src);
     size -= 1024;
-    if ((ret = ff_huff_build_tree(s->avctx, &vlc, 256, FF_HUFFMAN_BITS,
+    if ((ret = ff_huff_build_tree(s->avctx, &vlc, 256, VLC_BITS,
                                   nodes, huff_cmp,
                                   FF_HUFFMAN_FLAG_ZERO_COUNT)) < 0)
         return ret;
@@ -113,7 +114,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
     init_get_bits(&gb, s->tmpbuf, size * 8);
     for (j = 0; j < h; j++) {
         for (i = 0; i < w*step; i += step) {
-            dst[i] = get_vlc2(&gb, vlc.table, FF_HUFFMAN_BITS, 3);
+            dst[i] = get_vlc2(&gb, vlc.table, VLC_BITS, 3);
             /* lines are stored as deltas between previous lines
              * and we need to add 0x80 to the first lines of chroma planes
              */