Mercurial > libdvdnav.hg
changeset 419:8c87207b73ac src
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.
author | rathann |
---|---|
date | Sun, 09 Dec 2012 21:22:15 +0000 |
parents | fe65a31e707a |
children | d7720a050e67 |
files | dvdnav.c dvdnav_internal.h |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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; /*