Hi,
This is a resend of an old patch that we still keep in xbmc's version of
libdvdnav. The problem is that libdvdnav jumps over NAV packets when
playing multi angle features.
I don't remember all the exact details on this patch anymore since it was
many years since i tracked it down. But it is very obvious in xbmc since we
use nav packet end/start times to correct timestamps.
Without the patch we git gaps in nav packets that doesn's exist in the
streams. I think i still have a dvd sample that shows the issue.
/Joakim
From 39d41415ba436057908abd4bacbe8059c1b442c7 Mon Sep 17 00:00:00 2001
From: Joakim Plate <[email protected]>
Date: Mon, 31 Oct 2011 20:10:24 +0100
Subject: [PATCH] Make sure we get nav packets for all cells in multi angle
features
Currently libdvdnav uses the ILVU information to specify where a vobunit
ends if a feature is multiangled. However since one ILVU can contain
multiple vobunits, this means that libdvdnav never generates NAV events nor
updates highlight information for anything but the first vobunit in the
ILVU. It also causes issues for any player relying on timestamps in nav
packets to flatten the mpeg timestamps.
http://dvdnav.mplayerhq.hu/dvdinfo/dsi_pkt.html#ilvu
---
src/dvdnav.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/dvdnav.c b/src/dvdnav.c
index 4d0b4f1..017709e 100644
--- a/src/dvdnav.c
+++ b/src/dvdnav.c
@@ -336,8 +336,9 @@ static int32_t dvdnav_get_vobu(dvdnav_t *this, dsi_t *nav_dsi, pci_t *nav_pci, d
dvdnav_angle_change(this, 1);
}
#endif
-
- if(num_angle != 0) {
+ /* only use ILVU information if we are at the last vobunit in ILVU */
+ /* otherwise we will miss nav packets from vobunits inbetween */
+ if(num_angle != 0 && (nav_dsi->sml_pbi.category & 0x5000) == 0x5000) {
if((next = nav_pci->nsml_agli.nsml_agl_dsta[angle-1]) != 0) {
if((next & 0x3fffffff) != 0) {
--
1.7.7
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss