[MPlayer-dev-eng] [Patch] get_total_time for ogg

Moritz Bunkus moritz at bunkus.org
Mon Nov 10 12:08:00 CET 2003


Hi.

> > Ah no, don't store both, only store the timecode and use
> > (os->lastpos / os->rate) * 100 / ogg_d->final_timestamp or something
> > like this.
> 
> But this means, that I still have to use the rate in both places so I don't
> see the advantage.

No. os->lastpos is a granulepos and obviously belongs to the same os
that os->rate belongs to. So calculating the 'last timestamp seen' by
os->lastpos / os->rate is OK. But ogg_d->final_granulepos might belong to a
totally different os! That's the problem. So if you drop
ogg_d->final_granulepos and use ogg_d->final_timestamp then this value
is independent of the os.

-- 
 ==> Ciao, Mosu (Moritz Bunkus)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031110/a1d98f4a/attachment.pgp>


More information about the MPlayer-dev-eng mailing list