X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ffraps.c;h=55051ffe7e1624abed58ad58cb68990747cd2ac1;hb=11623217e3c9b859daee544e31acdd0821b61039;hp=7b198254d9a93c84b4911057b13a7c9123c9f597;hpb=def97856de6021965db86c25a732d78689bd6bb0;p=ffmpeg diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 7b198254d9a..55051ffe7e1 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -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,8 @@ 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, nodes, huff_cmp, + if ((ret = ff_huff_build_tree(s->avctx, &vlc, 256, VLC_BITS, + nodes, huff_cmp, FF_HUFFMAN_FLAG_ZERO_COUNT)) < 0) return ret; /* we have built Huffman table and are ready to decode plane */ @@ -112,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, 9, 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 */ @@ -161,9 +163,7 @@ static int decode_frame(AVCodecContext *avctx, prev_pic_bit = header & (1U << 31); /* bit 31 means same as previous pic */ if (version > 5) { - av_log(avctx, AV_LOG_ERROR, - "This file is encoded with Fraps version %d. " \ - "This codec can only decode versions <= 5.\n", version); + avpriv_report_missing_feature(avctx, "Fraps version %u", version); return AVERROR_PATCHWELCOME; }