[MPlayer-dev-eng] [PATCH] ae_lavc.c samples per block fix for imaadpcm
Michael Niedermayer
michaelni at gmx.at
Thu Jun 8 21:32:18 CEST 2006
Hi
On Thu, Jun 08, 2006 at 10:18:17AM -0700, joel Schantz wrote:
> Yea, I didn't like it myself. (simple fix for ugly code)
>
> Try this patch.
> Should be more portable, although it may not fit correct "coding
> standards"
this is still as wrong as the previous version
different cpus store variables with different byte order, you cannot
just blindly write a uint16_t into a buffer which then gets written into
a (avi)file
if you try to write 0x1234 then on x86 you would end up with 0x34 0x12
in the file and on ppc there would be 0x12 0x34 which isnt correct for avi
if you now wonder why all the other "not-opaque-bytebuffer" fields in
the waveformatex struct can simply be written as is, just look at aviheader.h
it byteswappes them (yes this is dead ugly design but it works ...) but this
trick cannot work with any fields where the structure isnt known, like the
extradata at the end
[...]
--
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 MPlayer-dev-eng
mailing list