On Fri, May 01, 2009 at 07:39:37PM +0300, Kostya wrote:
On Fri, May 01, 2009 at 06:08:37PM +0200, Laurent Aimar wrote:
I'd use s->crc_extra = AV_RL32(buf) and open bit buffer after that but this looks fine too. Oh, and please add block size check. Using the bitstream reader here seems simpler to me, and additionnaly avoid the need of buffer size checks ;)
It's not - if size <=4 (as WavPack source code says), it should be treated as error, so check is needed anyway (not for bits reading though).
Huh? Where does that idea that using the bitstream reader means you can skip the size checks come from? There is a CRC anyway, but I added the check to ensure detecting error as soon as possible (and to avoid the possibility of a false positive CRC in this
On Fri, May 01, 2009, Reimar D?ffinger wrote: particuliar case). -- fenrir