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

erik subversion at mplayerhq.hu
Mon Jan 31 00:44:16 CET 2011


Author: erik
Date: Mon Jan 31 00:44:16 2011
New Revision: 1222

Log:
Report which index failed reading

When reading the parental management information, report what
index if that read failed. This should improve error reporting.
Patch submitted by Frederic Marchal, fmarchal at perso dot be.

Modified:
   trunk/libdvdread/src/ifo_read.c

Modified: trunk/libdvdread/src/ifo_read.c
==============================================================================
--- trunk/libdvdread/src/ifo_read.c	Mon Jan 31 00:44:13 2011	(r1221)
+++ trunk/libdvdread/src/ifo_read.c	Mon Jan 31 00:44:16 2011	(r1222)
@@ -1357,7 +1357,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi
     if(!DVDFileSeek_(ifofile->file,
                      ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN
                      + ptl_mait->countries[i].pf_ptl_mai_start_byte)) {
-      fprintf(stderr, "libdvdread: Unable to seek PTL_MAIT table.\n");
+      fprintf(stderr, "libdvdread: Unable to seek PTL_MAIT table at index %d.\n",i);
       free(ptl_mait->countries);
       free(ptl_mait);
       ifofile->ptl_mait = NULL;
@@ -1371,7 +1371,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi
       return 0;
     }
     if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) {
-      fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table.\n");
+      fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table at index %d.\n",i);
       free(pf_temp);
       free_ptl_mait(ptl_mait, i);
       ifofile->ptl_mait = NULL;


More information about the DVDnav-discuss mailing list