[MPlayer-dev-eng] [PATCH] fix OSD decimal output for dvdnav
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Apr 22 12:45:13 CEST 2012
On Wed, Apr 18, 2012 at 10:22:29AM -0600, Roger Pack wrote:
> + // make return value more precise by adding in time elapsed
> since NAV packet
> + double time_since_last_nav_packet = sh_video->pts -
> last_stream_pos_at_that_dvd_time;
> + if(time_since_last_nav_packet > 0 &&
> time_since_last_nav_packet < 1.5) { // should never exceed 1.5s,
> typically <= 0.4
> + get_time_ans += time_since_last_nav_packet;
> + } else {
> + last_stream_pos_at_that_dvd_time = sh_video->pts;
That will exhibit some really strange behaviour in corner-cases.
For example, if two nav packets are indeed more than 1.5 seconds apart,
time will suddenly jump back by 1.5 seconds.
Time will also jump back when there is a PS timestamp discontinuity
between two NAV packets.
I also suspect that the "time_since_last_nav_packet < 1.5" check will
be completely confused the sudden jumps in stream_pts that can happen
when -cache is enabled.
More information about the MPlayer-dev-eng
mailing list