[DVDnav-discuss] r983 - trunk/libdvdnav/src/dvdread/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Sun Dec 30 15:29:21 CET 2007


Author: nicodvb
Date: Sun Dec 30 15:29:20 2007
New Revision: 983

Log:
fail DVDDiscID if no ifo files are found. ogle-1766

Modified:
   trunk/libdvdnav/src/dvdread/dvd_reader.c

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Sun Dec 30 15:29:20 2007
@@ -1079,6 +1079,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsign
 {
     struct md5_ctx ctx;
     int title;
+    int nr_of_files = 0;
 
     /* Check arguments. */
     if( dvd == NULL || discid == NULL )
@@ -1113,9 +1114,12 @@ int DVDDiscID( dvd_reader_t *dvd, unsign
 	    
 	    DVDCloseFile( dvd_file );
 	    free( buffer_base );
+	    nr_of_files++;
 	}
     }
     md5_finish_ctx( &ctx, discid );
+    if(!nr_of_files)
+      return -1;
     
     return 0;
 }



More information about the DVDnav-discuss mailing list