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

Moritz Bunkus moritz at bunkus.org
Mon Nov 10 10:33:51 CET 2003


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.

-- 
 ==> 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/e6122d42/attachment.pgp>


More information about the MPlayer-dev-eng mailing list