[MPlayer-cvslog] r19292 - trunk/libmpcodecs/ad_hwmpa.c

Uoti Urpala uoti.urpala at pp1.inet.fi
Tue Aug 1 21:24:37 CEST 2006


On Tue, 2006-08-01 at 20:44 +0200, ben wrote:
> fix a/v sync issues when using ad_hwmpa

This can't really fix them...

> +                /* HACK: seems to fix most A/V sync issues */
> +                break;

This really is an ugly hack that can't work properly. The basic problem
seems to be that the aos outputting AF_FORMAT_MPEG2 implement
get_delay() as "return 0;". MPlayer syncs video pts to the value
"end_pts_of_audio_fed_to_ao - ao->get_delay()" (which should match the
pts of the audio playing at the moment). This obviously doesn't work
well if the ao doesn't implement get_delay() sanely. I guess this patch
happens in help in some cases because the amount of buffered audio fits
better with the values currently returned by ao->get_size() (which in
this case is then responsible for the sync, though can't do it well). 

The right way to fix the sync is to implement some way of determining
the delay in the aos. If you don't know which part of previously decoded
audio is playing now there's no way to sync video to it properly.




More information about the MPlayer-cvslog mailing list