[FFmpeg-cvslog] avcodec/fraps: increase vlc nb_bits

Michael Niedermayer git at videolan.org
Tue Oct 1 20:47:39 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 28 20:45:51 2013 +0200| [795eaf8d698d46ea59dd9c9f7971f67a25015c0d] | committer: Michael Niedermayer

avcodec/fraps: increase vlc nb_bits

This should fix decoding the file in:
http://ffmpeg.gusari.org/viewtopic.php?f=16&t=1078
No i dont have the file so i cant test

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=795eaf8d698d46ea59dd9c9f7971f67a25015c0d
---

 libavcodec/fraps.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 8334afc..60c579d 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -40,6 +40,7 @@
 #include "thread.h"
 
 #define FPS_TAG MKTAG('F', 'P', 'S', 'x')
+#define VLC_BITS 11
 
 /**
  * local variable storage
@@ -94,7 +95,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;
@@ -106,7 +107,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
              */



More information about the ffmpeg-cvslog mailing list