Date: Sat, 26 Sep 2009 02:47:06 GMT From: Nate Eldredge <nate@thatsmathematics.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/139148: multimedia/dvdauthor: progress estimation bug in dvdunauthor Message-ID: <200909260247.n8Q2l6rH016330@www.freebsd.org> Resent-Message-ID: <200909260250.n8Q2o1Tj057859@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 139148 >Category: ports >Synopsis: multimedia/dvdauthor: progress estimation bug in dvdunauthor >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 26 02:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Nate Eldredge >Release: 7.1-RELEASE >Organization: >Environment: FreeBSD vulcan.lan 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Tue Mar 24 08:55:08 PDT 2009 root@vulcan.lan:/usr/obj/usr/src/sys/VULCAN amd64 >Description: dvdunauthor, from the multimedia/dvdauthor port, attempts to estimate the time remaining as it unauthors each title of a DVD. Due to an integer overflow the times reported are bogus, often negative. >How-To-Repeat: Run dvdunauthor on a disc with a large title, and wait a few seconds. >Fix: Patch below. Patch attached with submission follows: --- work/dvdauthor-0.6.14/src/dvdunauthor.c 2009-09-25 19:41:37.000000000 -0700 +++ work-new/dvdauthor-0.6.14/src/dvdunauthor.c 2009-09-17 08:40:45.000000000 -0700 @@ -877,7 +877,7 @@ if( rl > BIGBLOCKSECT ) rl = BIGBLOCKSECT; now=times(&tp); if( now-start>3*clkpsec && numsect>0 ) { - int rmn=(totalsect-numsect)*(now-start)/(numsect*clkpsec); + int rmn=((long long)(totalsect-numsect))*(now-start)/(numsect*clkpsec); fprintf(stderr,"STAT: [%d] VOB %d, Cell %d (%d%%, %d:%02d remain)\r",i,cells[i].vob_id,cells[i].cell_id,(numsect*100+totalsect/2)/totalsect,rmn/60,rmn%60); } else fprintf(stderr,"STAT: [%d] VOB %d, Cell %d (%d%%)\r",i,cells[i].vob_id,cells[i].cell_id,(numsect*100+totalsect/2)/totalsect); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909260247.n8Q2l6rH016330>