Commit 468e8841 authored by Frédéric Marchal's avatar Frédéric Marchal

Report which index failed reading

When reading the parental management information, report what
index if that read failed. This should improve error reporting.
parent 0fc8b0b3
......@@ -1357,7 +1357,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) {
if(!DVDFileSeek_(ifofile->file,
ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN
+ ptl_mait->countries[i].pf_ptl_mai_start_byte)) {
fprintf(stderr, "libdvdread: Unable to seek PTL_MAIT table.\n");
fprintf(stderr, "libdvdread: Unable to seek PTL_MAIT table at index %d.\n",i);
free(ptl_mait->countries);
free(ptl_mait);
ifofile->ptl_mait = NULL;
......@@ -1371,7 +1371,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) {
return 0;
}
if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) {
fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table.\n");
fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table at index %d.\n",i);
free(pf_temp);
free_ptl_mait(ptl_mait, i);
ifofile->ptl_mait = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment