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

Michael Behrisch behrisch at informatik.hu-berlin.de
Mon Nov 10 11:57:58 CET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Montag, 10. November 2003 10:33 schrieb Moritz Bunkus:
> Hi,
>
> > > +	case DEMUXER_CTRL_GET_PERCENT_POS:
> > > +	    if (ogg_d->final_granulepos<=0) return DEMUXER_CTRL_DONTKNOW;
> > > +	    *((int *)arg)=(int)( (os->lastpos*100) /
> > > ogg_d->final_granulepos); +	    return DEMUXER_CTRL_OK;
> >
> > Ok, you do need the granulepos. Then store both.
>
> 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.

Thanks for your comments,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/r282ZDyR4hR8HnQRAmU/AJwMlEkD3kFwuXLOujo5JiN6emSpbACgg5Yz
GmMYNkxhRB1cjqFRhe9ekTU=
=bgV5
-----END PGP SIGNATURE-----



More information about the MPlayer-dev-eng mailing list