I've encountered some DVDs which (likely due to bad mastering) trigger the HandBrake error: "is not before last_sector" and as a result the correct title is ignored. This makes it impossible to process this title, even with the command-line tool and specifying the appropriate title number. These DVDs do play back using the Apple DVD player and VLC so other tools are not as strict as HandBrake at validating the DVD format.
The problem can be fixed simply by disabling the error, as done in the attached patch. I was then able to process the titles I needed without any problem, and have not encountered issues with other DVDs either.
Make "is not before last_sector" a warning rather than error
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
Re: Make "is not before last_sector" a warning rather than e
You didn't attach the patch?
Re: Make "is not before last_sector" a warning rather than e
Apologies, here's the (trivial) patch:
Code: Select all
Index: libhb/dvd.c
===================================================================
--- libhb/dvd.c (revision 6262)
+++ libhb/dvd.c (working copy)
@@ -242,7 +242,7 @@
"is not before last_sector (0x%x) - skipping title", i,
vts->vts_c_adt->cell_adr_table[i].start_sector,
vts->vts_c_adt->cell_adr_table[i].last_sector );
- goto fail;
+ //goto fail;
}
}
Re: Make "is not before last_sector" a warning rather than e
hah, go to love the "goto fail" bugs this year
- JohnAStebbins
- HandBrake Team
- Posts: 5723
- Joined: Sat Feb 09, 2008 7:21 pm
Re: Make "is not before last_sector" a warning rather than e
Although this isn't a "bug". That code was added to address crashes that would occur when those particular conditions occurred. So I will need to reevaluate the original issue before this kind of change can be made.s55 wrote:hah, go to love the "goto fail" bugs this year
See viewtopic.php?f=4&t=9758&sid=b6deb84bf0 ... 722#p53722
- JohnAStebbins
- HandBrake Team
- Posts: 5723
- Joined: Sat Feb 09, 2008 7:21 pm
Re: Make "is not before last_sector" a warning rather than e
gwalton, I don't want to try to fix this till after we get the pending release out the door. It's going to need more test time than we can give it right now. In rereading the original forum thread about the problem, I see that the actual root cause of the crash was never determined and the patch was just a workaround that solved the immediate issue. There is even a note I made about another user having the same problem as you. So I think it would be good to toss the original patch and uncover the real issue (if it still exists). But not right now.
This same block of code was also added to dvdnav.c at the same time it was added to dvd.c. I removed it from dvdnav.c a while ago because there were more discs showing up that it causes issues with. https://trac.handbrake.fr/changeset/5787
Which brings up a point, why do you have dvdnav disabled. You would not have this problem if you left dvdnav enabled in preferences.
This same block of code was also added to dvdnav.c at the same time it was added to dvd.c. I removed it from dvdnav.c a while ago because there were more discs showing up that it causes issues with. https://trac.handbrake.fr/changeset/5787
Which brings up a point, why do you have dvdnav disabled. You would not have this problem if you left dvdnav enabled in preferences.