[MPlayer-dev-eng] Low resolution on pts in demux_mkv

Dan Oscarsson Dan.Oscarsson at tieto.com
Sun Oct 4 17:10:05 CEST 2009


Hi

I have been looking at pts values for some time. pts values from .mkv
files end up with low resolution even if the pts values in the .mkv file
have a high resolution. This is due to the code in
libmpdemux/demux_mkv.c

In handle_block pts values are calculated from:

    tc = ((time*mkv_d->tc_scale+mkv_d->cluster_tc) /1000000.0 - mkv_d->first_tc);

As tc is an integer, precision will be lost.

Is this a mistake or planned so?

While I see that most .mkv files are generated with low precision pts
values, mplayer should not make pts values worse then they are from the
beginning?

It is easy to fix.

Regards,

  Dan






More information about the MPlayer-dev-eng mailing list