[MPlayer-dev-eng] [PATCH] read wav files in nBlockAlign chunks

Diego Biurrun diego at biurrun.de
Tue Jan 24 02:25:22 CET 2006


On Sat, Jan 14, 2006 at 10:45:14AM +0100, Reimar Döffinger wrote:
> On Sat, Jan 14, 2006 at 12:58:58AM +0100, Roberto Togni wrote:
> > On Sat, 7 Jan 2006 00:26:45 +0100
> > Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > > First, I think nBlockAlign might be 0. Second, it can be very small
> > > (esp. for raw files), resulting in a very high demuxing overhead.
> > > Can't you just round nAvgBytesPerSec by nBlockAlign (if non-zero)?
> > > 
> > Attached patch does it, please test.
> 
> Oops, completely forgot about that. I actually wanted to suggest a
> different approach.
> The difference:
> I think your approach might break the alignment with very low bitrate
> files.
> On the other hand, my patch might cause problems with very large values
> of nBlockAlign - though I just checked, nBlockAlign is only 16 bits
> (unsigned) so I think it might actually be better ("accidentially"
> rounding the block size to at most 64k should rarely be problematic).
> Of course my "formula" is more ugly though ;-)

What about this?  Which approach is it going to be then?

Diego




More information about the MPlayer-dev-eng mailing list