summaryrefslogtreecommitdiff
path: root/multimedia/dvdauthor/patches/patch-aa
blob: 6bed76f2aa5488a203dc045e7e29f524beeb3442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-aa,v 1.4 2010/05/08 16:11:06 drochner Exp $

--- src/dvdunauthor.c.orig	2010-03-05 04:20:47.000000000 +0000
+++ src/dvdunauthor.c
@@ -1033,6 +1033,7 @@ static void getVobs(dvd_reader_t *dvd, c
     const cell_adr_t *cells;
     int numcells,i,j,totalsect,numsect;
     clock_t start,now,clkpsec;
+    struct tms unused_tms;
 
     cptr = titlef ? ifo->vts_c_adt : ifo->menu_c_adt;
     if (cptr)
@@ -1054,7 +1055,7 @@ static void getVobs(dvd_reader_t *dvd, c
     for (i = 0; i < numcells; i++)
         totalsect += cells[i].last_sector - cells[i].start_sector + 1;
     clkpsec = sysconf(_SC_CLK_TCK);
-    start = times(NULL);
+    start = times(&unused_tms);
     
     for (i = 0; i < numcells; i++)
       {
@@ -1106,7 +1107,7 @@ static void getVobs(dvd_reader_t *dvd, c
             int rl = cells[i].last_sector + 1 - b;
             if (rl > BIGBLOCKSECT)
                 rl = BIGBLOCKSECT;
-            now = times(NULL);
+            now = times(&unused_tms);
             if (now-start > 3 * clkpsec && numsect > 0)
               {
                 const int rmn = (totalsect - numsect) * (now - start) / (numsect * clkpsec);