[FFmpeg-devel] [PATCH] Fraps fix

Michael Niedermayer michaelni
Thu Feb 28 19:55:28 CET 2008


On Sun, Feb 24, 2008 at 04:13:48AM +0100, Roine Gustafsson wrote:
>
> Fraps sometimes glitches with current SVN because symbols with zero count 
> is not added to the huffman tree despite Kostya's stern warning: 
> <http://wiki.multimedia.cx/index.php?title=Fraps>
> It seems VP6 and Fraps differ in this regard (both share the huffman tree 
> build code)
> None of the current Fraps samples on mplayerhq seem to exhibit this bug; 
> here is a sample that does: <http://www.mediafire.com/?e4dqezhxcm2>
>
> Suggested patch attached. This correctly plays the broken one, all Fraps 
> samples on mplayerhq and all VP6 samples that worked before.
>
>
>   /Roine
>
>
[...]

> Index: libavcodec/huffman.c
> ===================================================================
> --- libavcodec/huffman.c	(revision 12184)
> +++ libavcodec/huffman.c	(working copy)
> @@ -28,12 +28,14 @@
>  #define HNODE -1
>  
>  
> -static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos)
> +static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, 
> +                           Node *nodes, int node, uint32_t pfx, int pl, 
> +                           int *pos, int include_zero_count)
>  {

Trailing whitespace is forbidden in svn, also i think a int flags would be
more readable than adding a new int for every flag.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080228/1e915b20/attachment.pgp>



More information about the ffmpeg-devel mailing list