Quote:
Originally Posted by tebasuna51
Bugs
The last buffer send to the encoder can be incomplete but is send complete, then there are extrabytes at end.
|
Finally I found a bug in Microsoft VfW AVIStreamRead function - it still "read" data even if EOF is alredy occured....
Now I'm using such workaround:
Code:
int nHowMany = Math.Min((int) (m_aviStreamInfo.dwLength-frameSample), MAX_SAMPLES_PER_ONCE) ;
AVIStreamRead(m_aviStream, frameSample, nHowMany, h.AddrOfPinnedObject(), frameBufferTotalSize, out bytesRead, out samplesRead);