[MPlayer-cvslog] r33448 - trunk/gui/mplayer/gui_common.c

Ingo Brückl ib at wupperonline.de
Sun May 22 13:51:24 CEST 2011


Reimar Döffinger wrote on Sun, 22 May 2011 12:56:08 +0200:

>> - asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000.0;
>> +      if (fileh->play_duration>10000*fileh->preroll) asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000.0;
>> +      else asf->movielength=0;

> Isn't it equivalent and more obvious to do
> asf->movielength=FFMAX((fileh->play_duration-10000*fileh->preroll)/100000
> 00.0, 0.0);
> for example?

All the fileh variables are unsigned.

> Or in a separate line.

I don't get what you might mean by that.

> Just think it would be better to avoid duplicating the
> 10000*fileh->preroll stuff.

Yes, I agree.

Maybe this attempt is better?

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asfheader.patch
Type: text/x-diff
Size: 992 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20110522/2f5a32bf/attachment.bin>


More information about the MPlayer-cvslog mailing list