[MPlayer-dev-eng] [PATCH] fix OSD decimal output for dvdnav

Roger Pack rogerdpack2 at gmail.com
Fri Nov 11 00:21:39 CET 2011


Hello. Apologies for the flood.

Anyway, currently with the OSD decimal output, it gets the "second"
portion from  demuxer_get_current_time (the NAV packets) and gets the
"decimal portion" of the output from sh_video->pts.

Since these don't match with DVD's (the NAV packets only occur every
0.5s, and are usually about 0.1s "off" the MPEG timestamps), it can
lead to odd OSD output, for example:

$ mplayer  dvdnav://1 -osd-fractions 1 -osdlevel 2

OSD output:

...
00:00:04.04
00:00:04.08
00:00:04.12
00:00:04.16
00:00:04.20
00:00:04.24
00:00:04.29
00:00:04.33
00:00:05.37 # note the shift here...
00:00:05.41
00:00:05.45
00:00:05.50
00:00:05.55
00:00:05.60
00:00:05.65
00:00:05.70
00:00:05.75
00:00:05.80
00:00:05.84
00:00:05.90
00:00:05.95
00:00:05.99
00:00:05.04 # shift again, because the two are offset.
...
[repeat]

Also if there has been a timestamp reset ever, it leads to even odder
output numbers, like

01:20:05.-8

displayed in the OSD.

This patch makes the OSD "monotonically increase" and doesn't seem to
hurt other stream types.

For dvdnav, it now outputs the equivalent of:

...
00:00:00.40
00:00:00.40
00:00:00.40
00:00:00.40
00:00:00.80
00:00:00.80
00:00:00.80
00:00:00.80
00:00:00.80
00:00:00.80
00:00:00.80
00:00:01.20
00:00:01.20
...

which, though less precise, seems more accurate (and works past
reset's et al).  My hope is to (should these patches eventually be
applied) submit another diff that makes these timestamps even more
accurate, but this would is an improvement, at least from my
perspective.  I also am considering another similar patch for EDL
timestamps checking, so that EDL's can work with dvdnav (esp. past any
MPEG PTs resets).
Feedback welcome.

Thanks.
-roger-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: show_correct_osd_fractions_for_dvdnav.diff
Type: application/octet-stream
Size: 3739 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111110/12f35f08/attachment.obj>


More information about the MPlayer-dev-eng mailing list