[DVDnav-discuss] r1259 - trunk/libdvdnav/src/searching.c

rathann subversion at mplayerhq.hu
Fri Oct 4 00:10:07 CEST 2013


Author: rathann
Date: Fri Oct  4 00:10:07 2013
New Revision: 1259

Log:
Fix crash when trying to play a DVD from different region than currently set
in the DVD drive.

Patch by Erik Hovland *erik#hovland$.org! based on a patch
by Sylvain Henry %hsyl20^gmail&com*.

Modified:
   trunk/libdvdnav/src/searching.c

Modified: trunk/libdvdnav/src/searching.c
==============================================================================
--- trunk/libdvdnav/src/searching.c	Thu Oct  3 23:57:48 2013	(r1258)
+++ trunk/libdvdnav/src/searching.c	Fri Oct  4 00:10:07 2013	(r1259)
@@ -622,7 +622,11 @@ uint32_t dvdnav_describe_title_chapters(
       goto fail;
     }
 
-    cellnr = pgc->program_map[ptt[i].pgn-1];
+    if ((cellnr = pgc->program_map[ptt[i].pgn-1]) == 0) {
+      printerr("Cell new row cannot be 0");
+      continue;
+    }
+
     if(ptt[i].pgn < pgc->nr_of_programs)
       endcellnr = pgc->program_map[ptt[i].pgn];
     else


More information about the DVDnav-discuss mailing list