# HG changeset patch # User rathann # Date 1355088135 0 # Node ID 8c87207b73ac1b70b5adeb13e3058886d6f88cf2 # Parent fe65a31e707a9342575ef3e91a110882fdb81cd2 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. Patch by Joakim Plate. diff -r fe65a31e707a -r 8c87207b73ac dvdnav.c --- a/dvdnav.c Sun Dec 09 21:13:14 2012 +0000 +++ b/dvdnav.c Sun Dec 09 21:22:15 2012 +0000 @@ -336,8 +336,9 @@ 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 & DSI_ILVU_MASK) == (DSI_ILVU_BLOCK | DSI_ILVU_LAST)) { if((next = nav_pci->nsml_agli.nsml_agl_dsta[angle-1]) != 0) { if((next & 0x3fffffff) != 0) { diff -r fe65a31e707a -r 8c87207b73ac dvdnav_internal.h --- a/dvdnav_internal.h Sun Dec 09 21:13:14 2012 +0000 +++ b/dvdnav_internal.h Sun Dec 09 21:22:15 2012 +0000 @@ -76,6 +76,14 @@ #define DVD_VIDEO_LB_LEN 2048 #endif +typedef enum { + DSI_ILVU_PRE = 1 << 15, /* set during the last 3 VOBU preceeding an interleaved block. */ + DSI_ILVU_BLOCK = 1 << 14, /* set for all VOBU in an interleaved block */ + DSI_ILVU_FIRST = 1 << 13, /* set for the first VOBU for a given angle or scene within a ILVU, or the first VOBU in the preparation (PREU) sequence */ + DSI_ILVU_LAST = 1 << 12, /* set for the last VOBU for a given angle or scene within a ILVU, or the last VOBU in the preparation (PREU) sequence */ + DSI_ILVU_MASK = 0xf000 +} DSI_ILVU; + typedef struct read_cache_s read_cache_t; /*