[Ffmpeg-devel] AV Synchronization question

Emanuele Fumagalli emanuele.fumagalli
Fri Jan 26 15:39:05 CET 2007


Sorry to bother again but I got no answers from the other mailing list (I 
guess there are only people who just use the executables).
So I'll try posting here

My player simply has a thread that decodes frames, so I repeatedly call 
av_read_frame(m_Context, &pkt) and I decode the packets (audio and video) 
put them in separated queues and redender them as fast as I can from 
externals threads (video and audio).
I get good results but on some kind of files the audio-video synchro is very 
bad (mov files: h264 video, aac audio).
My first question is: how come that the timing is correct, I mean I get a 
frame every framerate ms without performing any timing delay, what should I 
do to decode faster ?(not waiting the right delay between frames)

Then I'd like to know how to sync av better.
Is there some code examples (apart ffplay.c) or some tips to do that?

Thanks in advance for any answer or tips

Emanuele





More information about the ffmpeg-devel mailing list