[Ffmpeg-devel] Bug: wav decoder decodes garbage at end of file

Michael Niedermayer michaelni
Mon Jun 26 19:21:12 CEST 2006


On Mon, Jun 26, 2006 at 04:56:36PM +0200, Ulrich von Zadow wrote:
> >> determine how many bytes are left to read. When none are left, set
> >> s->eof_reached=1.
> >
> >no, messing with eof_reached is unaceptable
> Ok, so what is the correct way?

well, read and parse till the end and it will be set automatically ...
dont read till the end and you arent at eof so why should it be set
at all then?

> >also the correct behavior is to parse the chunks afterwards too, even if 
> >you
> >just skip over them, after all there could in principle be another WAVE 
> >chunk
> Ok, granted. But unless there's an easy way to do this: Would you accept a 
> patch that just stopped parsing after the first wave chunk? Wouldn't that 
> be a lot easier to code? There's a definite limit to the time I can spend 
> on this, and I assume that there are very few wav files with more than one 
> WAVE chunk.

well, i see no reason to ignore the data after the first chunk, whatever
it might be, if for example theres more audio data then the current code
will besides some "click" sound play it fine while your solution will
truncate the file
so no, i will not accpet anything but the correct solution, even if that
means no patch

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list