[DVDnav-discuss] r1246 - in trunk/libdvdnav/src: dvdnav.c dvdnav_internal.h
rathann
subversion at mplayerhq.hu
Sun Dec 9 22:22:15 CET 2012
Author: rathann
Date: Sun Dec 9 22:22:15 2012
New Revision: 1246
Log:
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.
Modified:
trunk/libdvdnav/src/dvdnav.c
trunk/libdvdnav/src/dvdnav_internal.h
Modified: trunk/libdvdnav/src/dvdnav.c
==============================================================================
--- trunk/libdvdnav/src/dvdnav.c Sun Dec 9 22:13:14 2012 (r1245)
+++ trunk/libdvdnav/src/dvdnav.c Sun Dec 9 22:22:15 2012 (r1246)
@@ -336,8 +336,9 @@ static int32_t dvdnav_get_vobu(dvdnav_t
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) {
Modified: trunk/libdvdnav/src/dvdnav_internal.h
==============================================================================
--- trunk/libdvdnav/src/dvdnav_internal.h Sun Dec 9 22:13:14 2012 (r1245)
+++ trunk/libdvdnav/src/dvdnav_internal.h Sun Dec 9 22:22:15 2012 (r1246)
@@ -76,6 +76,14 @@ static inline int _private_gettimeofday(
#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;
/*
More information about the DVDnav-discuss
mailing list