[DVDnav-discuss] r1231 - trunk/libdvdread/src/ifo_read.c

erik subversion at mplayerhq.hu
Sat Aug 13 19:28:43 CEST 2011


Author: erik
Date: Sat Aug 13 19:28:43 2011
New Revision: 1231

Log:
Conditional style change

Modified:
   trunk/libdvdread/src/ifo_read.c

Modified: trunk/libdvdread/src/ifo_read.c
==============================================================================
--- trunk/libdvdread/src/ifo_read.c	Sat Aug 13 19:28:40 2011	(r1230)
+++ trunk/libdvdread/src/ifo_read.c	Sat Aug 13 19:28:43 2011	(r1231)
@@ -1176,9 +1176,9 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *i
 
   info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE;
   data = malloc(info_length);
-  if(!data) {
+  if(!data)
     goto fail;
-  }
+
   if(!(DVDReadBytes(ifofile->file, data, info_length))) {
     fprintf(stderr, "libdvdread: Unable to read PTT search table.\n");
     goto fail;
@@ -1196,19 +1196,21 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *i
   vts_ptt_srpt->ttu_offset = data;
 
   vts_ptt_srpt->title = malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t));
-  if(!vts_ptt_srpt->title) {
+  if(!vts_ptt_srpt->title)
     goto fail;
-  }
+
   for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
     int n;
     if(i < vts_ptt_srpt->nr_of_srpts - 1)
       n = (data[i+1] - data[i]);
     else
       n = (vts_ptt_srpt->last_byte + 1 - data[i]);
+
     /* assert(n > 0 && (n % 4) == 0);
        Magic Knight Rayearth Daybreak is mastered very strange and has
        Titles with 0 PTTs. */
     if(n < 0) n = 0;
+
     CHECK_VALUE(n % 4 == 0);
 
     vts_ptt_srpt->title[i].nr_of_ptts = n / 4;


More information about the DVDnav-discuss mailing list