[FFmpeg-devel] [PATCH] Added integer 32 bits support to wavpack

Kostya kostya.shishkov
Sat May 2 20:36:39 CEST 2009

On Sat, May 02, 2009 at 08:03:17PM +0200, Laurent Aimar wrote:
> On Sat, May 02, 2009, Kostya wrote:
> > >  I thought that the bitstream layer ensured that no read could go beyond the
> > > provided buffer.
> > >  Looking at get_bits.h it does not seems to, so I have attached a patch that
> > > check that the provided buffer is wide enought.
> > 
> > Why not check it once during initialization? Decoder always read
> > extra_bits*channels*samples+32, doesn't it?
>  From wv docs, it does not seems that the order of the chunks is imposed, so
> I cannot suppose that INT32INFO (needed to know the number of bits)
> is received before EXTRA_BITS.

On the second thought this check is not really needed - we may be more
or less sure that we got right CRC so wrong bits will be catched by it.
Checking it for each sample is an overkill IMO. You can always check
that after all chunks are parsed but before real decode has started but
I'd like to see those efforts spent on finishing float WavPack support
> -- 
> fenrir

More information about the ffmpeg-devel mailing list