changeset 323:d132820611d3 src

fail DVDDiscID if no ifo files are found. ogle-1766
author nicodvb
date Sun, 30 Dec 2007 14:29:20 +0000
parents fc94594033a8
children f59175f21e06
files dvdread/dvd_reader.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dvdread/dvd_reader.c	Sun Dec 30 14:22:32 2007 +0000
+++ b/dvdread/dvd_reader.c	Sun Dec 30 14:29:20 2007 +0000
@@ -1079,6 +1079,7 @@
 {
     struct md5_ctx ctx;
     int title;
+    int nr_of_files = 0;
 
     /* Check arguments. */
     if( dvd == NULL || discid == NULL )
@@ -1113,9 +1114,12 @@
 	    
 	    DVDCloseFile( dvd_file );
 	    free( buffer_base );
+	    nr_of_files++;
 	}
     }
     md5_finish_ctx( &ctx, discid );
+    if(!nr_of_files)
+      return -1;
     
     return 0;
 }