[MPlayer-cvslog] r28216 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Wed Dec 31 15:21:51 CET 2008


Author: reimar
Date: Wed Dec 31 15:21:50 2008
New Revision: 28216

Log:
Work around a dvdread bug where DVDReadBlocks would return values < 0 on read error,
causing hangs e.g. when seeking to the very last chapter (which would read beyond the
size of the DVD).

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Tue Dec 30 22:39:42 2008	(r28215)
+++ trunk/stream/stream_dvd.c	Wed Dec 31 15:21:50 2008	(r28216)
@@ -364,7 +364,8 @@ read_next:
   }
 
   len = DVDReadBlocks(d->title, d->cur_pack, 1, data);
-  if(!len) return -1; //error
+  // only == 0 should indicate an error, but some dvdread version are buggy when used with dvdcss
+  if(len <= 0) return -1; //error
 
   if(data[38]==0 && data[39]==0 && data[40]==1 && data[41]==0xBF &&
     data[1024]==0 && data[1025]==0 && data[1026]==1 && data[1027]==0xBF) {



More information about the MPlayer-cvslog mailing list