Could you explain this function?
/*** For audio streams: ***/
/**
* Reads and decompresses variable number of frames into
* user-supplied buffer.
*/
virtual HRESULT ReadFrames(void* buffer, uint_t bufsize, uint_t samples,
uint_t& samples_read, uint_t& bytes_read) =0;
It looks like it has to be called like fread(). But it segfaults
when bufsize or samples are too small!
I now copied the code from avi2divx and my avi2yuvwav (should better
be called avi2yuvraw...) works now, but I want to know what the
parameters really mean.
BTW: avifile really needs more documentation. The mistake I done
in my previous code was that I changed the CImage * I got from
GetFrame(). It's not documented that I may not do this - and the
CImage * is not a const CImage * as it should be in this case.
And the copying semantics of CImage is really brain-dead:
standard c++ avifile
CImage i = ...; CImage i = ...;
CImage i2 = i; CImage i2 = &i;
CImage *j = ...; CImage *j = ...;
CImage *j2 = new CImage (*j); CImage *j2 = new CImage (j);
Why not add proper C++ copy constructors?
_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile