[MPlayer-dev-eng] Revision 22879 causes AV sync problem with lavc option ‘keyint’

Jonathon Elwood jaelwood at gmail.com
Fri Apr 6 19:51:01 CEST 2007

In Revision 22879 a change was made to muxer_mpeg.c that is causing the AV
sync to be incorrect if the lavc option 'keyint' is used.  If I reverse the
changes made in Revision 22879 the AV sync is fine again with the keyint

Below is an example command line:

mencoder -oac lavc -of mpeg -mpegopts format=dvd -o "output file.mpg" -ovc
lavc -vf scale=320:-2,harddup -lavcopts
vcodec=mpeg2video:keyint=15:acodec=mp2:abitrate=192 -ofps 24000/1001 "input

This is only a problem if the keyint option is used.  If I remove this
option from the command line the AV sync is fine.

The description on this change is: "in flush_buffers() removed code that
required the presence of an amount of audio data >= video data in the
temporal domain", however, I don't know this code, so that doesn't mean much
to me.  It was obviously made because of another problem someone else was
experiencing.  Since I'm not familiar, with this code, and any patch I try
to make would probably break the original intent of this change.  Would
anyone be willing to look at this and find a way for Revision 22879 to
exist, but not affect the AV sync when the lavc option of keyint is used?

More information about the MPlayer-dev-eng mailing list