Synchronising video with audio

Tom Gaudasinski <[email protected]> Tue, 27 Dec 2005 21:31:51 +0000
Newsgroups gmane.comp.multimedia.avifile.general
Message-ID <[email protected]>
Greetings,
    I've been having a look at the aviread code today and see that it 
does in fact do what i need. Which is to decode the avi format and allow 
me to access the video and audio streams so that I may then use xvid and 
lame myself to decode them. My question is this, how do i make sure the 
two stay synchronised? Do i just ReadPacket() from both and display the 
video and audio contained withing these packets, or is there another 
mechanism that should be employed? (keeping track of the timecode?) I'd 
like to know how it's meant to be done, the proper way, if there is such 
a thing in this instance.

Thank you.
--Tom G.