View Single Post
Old 28th December 2005, 15:12   #6  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
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);
dimzon is offline   Reply With Quote