[libdvdnav-devel] [PATCH 2/4] Don't abort if PGC structure can't be read.
Pierre Lamot
pierre at videolabs.io
Tue Jan 9 15:52:15 CET 2018
Some DVD contains unused invalids PGC (ie: inaccessible location).
---
src/ifo_read.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/ifo_read.c b/src/ifo_read.c
index aebc184..8d515fc 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -1928,12 +1928,10 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit,
pgcit->pgci_srp[i].pgc->ref_count = 1;
if(!ifoRead_PGC(ifofile, pgcit->pgci_srp[i].pgc,
offset + pgcit->pgci_srp[i].pgc_start_byte)) {
- int j;
- for(j = 0; j <= i; j++) {
- ifoFree_PGC(&pgcit->pgci_srp[j].pgc);
- }
+ fprintf(stderr, "libdvdread: Unable invalid PCG\n");
+ //E-One releases provide boggus PGC, ie: out of bound start_byte
free(pgcit->pgci_srp[i].pgc);
- goto fail;
+ pgcit->pgci_srp[i].pgc = NULL;
}
}
--
2.14.1
More information about the libdvdnav-devel
mailing list