[Mplayer-cvslog] CVS: main/libmpdemux demux_ogg.c,1.40,1.41
Alex Beregszaszi
alex at fsn.hu
Mon Dec 8 16:16:53 CET 2003
Hi,
> > @@ -1225,8 +1226,7 @@
> > switch(cmd) {
> > case DEMUXER_CTRL_GET_TIME_LENGTH:
> > if (ogg_d->final_granulepos<=0) return
> > DEMUXER_CTRL_DONTKNOW;
> > - unsigned long length = ogg_d->final_granulepos / rate;
> > - *((unsigned long *)arg)=length;
> > + *((unsigned long *)arg)=ogg_d->final_granulepos / rate;
> Why is it 1000l? Ok, it's unnececary memory wasting and so on (the
> compiler probably will allocate some nontheless ;), but I see no
> mistake here.
Memory wasting? On good case it will reside in a register, but it
defined a variable inside code.. that's c++ism, and of course it failed
with gcc 2.95.3
--
Alex Beregszaszi <alex at fsn.hu>
(MPlayer Core Developer -- http://www.mplayerhq.hu/)
More information about the MPlayer-cvslog
mailing list