[FFmpeg-devel] [PATCH] Fraps fix

Aurelien Jacobs aurel
Sat Mar 8 19:10:19 CET 2008


On Thu, 28 Feb 2008 19:55:28 +0100
Michael Niedermayer <michaelni at gmx.at> wrote:

> 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.

Applied slightly differently, using a int flags.

Aurel




More information about the ffmpeg-devel mailing list