5 years agobuild: install basic documentation files. buildsystem-cleanup gitorious/buildsystem-cleanup
Diego Elio Pettenò [Wed, 6 Feb 2013 18:46:28 +0000 (10:46 -0800)]
build: install basic documentation files.

5 years agobuild: fix doc/ subdirectory references.
Diego Elio Pettenò [Wed, 6 Feb 2013 18:43:02 +0000 (10:43 -0800)]
build: fix doc/ subdirectory references.

5 years agobuild: rmeove and references to files that are gone.
Diego Elio Pettenò [Wed, 6 Feb 2013 18:42:10 +0000 (10:42 -0800)]
build: rmeove and references to files that are gone.

5 years agobuild: remove unused macro definition.
Diego Elio Pettenò [Wed, 6 Feb 2013 18:40:54 +0000 (10:40 -0800)]
build: remove unused macro definition.

5 years agobuild: restore AC_C_BIGENDIAN call.
Diego Elio Pettenò [Wed, 6 Feb 2013 18:39:47 +0000 (10:39 -0800)]
build: restore AC_C_BIGENDIAN call.

5 years agobuild: do not check for dlopen() as it's unused.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:41:40 +0000 (09:41 -0800)]
build: do not check for dlopen() as it's unused.

5 years agoAdd a .gitignore file.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:40:05 +0000 (09:40 -0800)]
Add a .gitignore file.

5 years agobuild: simplify exported symbols regex.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:37:35 +0000 (09:37 -0800)]
build: simplify exported symbols regex.

This is the only regex matching the symbols that are built.

5 years agobuild: drop most of the unused checks from the configure and make it reasonable.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:35:40 +0000 (09:35 -0800)]
build: drop most of the unused checks from the configure and make it reasonable.

5 years agoUpdate basic documentation files.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:19:17 +0000 (09:19 -0800)]
Update basic documentation files.

This includes the removal of INSTALL and NEWS files that were forced
by the non-foreign automake flavour.

5 years agobuild: use libtool 2.0 and do not disable static build by default.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:14:43 +0000 (09:14 -0800)]
build: use libtool 2.0 and do not disable static build by default.

5 years agobuild: do not use dvdread-config to find libdvdread.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:12:27 +0000 (09:12 -0800)]
build: do not use dvdread-config to find libdvdread.

Rely on pkg-config only, as that's what we're going to do for
libdvdread next.

5 years agobuild: drop dvdnav-config and m4/dvdnav.m4.
Diego Elio Pettenò [Wed, 6 Feb 2013 17:08:15 +0000 (09:08 -0800)]
build: drop dvdnav-config and m4/dvdnav.m4.

Rely solely on pkg-config to find the library, as that makes it much simpler.

5 years agobuild: replace old automake-based build with a non-recursive
Diego Elio Pettenò [Wed, 6 Feb 2013 17:05:10 +0000 (09:05 -0800)]
build: replace old automake-based build with a non-recursive

This new buildsystem is non-recursive (so it uses higher parallel
build), but also drops libdvdnavmini (which is just an alias for
libdvdnav itself), and a few more useless sophistications.

5 years agobuild: drop non-autotools build system
Diego Elio Pettenò [Wed, 6 Feb 2013 16:36:32 +0000 (08:36 -0800)]
build: drop non-autotools build system

5 years agoconfigure: drop broken cross-compiling note.
Diego Elio Pettenò [Wed, 6 Feb 2013 16:33:57 +0000 (08:33 -0800)]
configure: drop broken cross-compiling note.

5 years agoLet dvdnav_describe_title_chapters() skip PGCs with missing cells
Fabian Keil [Sat, 8 Dec 2012 20:52:08 +0000 (21:52 +0100)]
Let dvdnav_describe_title_chapters() skip PGCs with missing cells

Fixes segfaults with a rip of Ghost Protocol.

Signed-off-by: Jean-Baptiste Kempf <>
5 years agoAdd a couple of additional sanity checks for dvdnav_describe_title_chapters()
Fabian Keil [Sun, 4 Nov 2012 17:03:33 +0000 (18:03 +0100)]
Add a couple of additional sanity checks for dvdnav_describe_title_chapters()

Fixes crashes with non-compliant DVDs after applying
the duplicate detection patch for libdvdread.

It might make more sense to do those checks in libdvdread
instead and zero out structures that don't check out.

Signed-off-by: Jean-Baptiste Kempf <>
5 years agoFix broken logic
Jean-Baptiste Kempf [Tue, 5 Feb 2013 16:13:41 +0000 (17:13 +0100)]
Fix broken logic

5 years agoMake examples optional
Erik Hovland [Tue, 16 Oct 2012 17:50:34 +0000 (10:50 -0700)]
Make examples optional

There was a time where dvdnav examples failed to build on mingw.  Rather
than fix them, we just disabled examples since we had no need for them.
Although the examples seem to build fine now, this option may be useful
in general.

Patch provided by John Stebbins (stebbins AT jetheaddev DOT come),

5 years agodvdnav_sector_search: allow backward search for SEEK_CUR
Mirakels [Sun, 9 Sep 2012 18:20:37 +0000 (20:20 +0200)]
dvdnav_sector_search: allow backward search for SEEK_CUR

As offset was an uint64_t offset could not be negative. Seeking
backwards is then only possible by get_position(), substract an
offset and do a SEEK_SET.
Now with a signed offset SEEK_CUR can be used to go backwards
without getting the current position first.

5 years agodvdnav_get_position: fix calculation for multi-angle DVDs
Mirakels [Thu, 6 Sep 2012 21:18:17 +0000 (23:18 +0200)]
dvdnav_get_position: fix calculation for multi-angle DVDs

This also fixes wrong positioning in dvdnav_sector_search() for
multi-angle DVDS.
BLOCK_TYPE_ANGLE_BLOCK cells seem to overlap sectors in the previous
cell hence they should be skipped when adding cell lengths up to get
to the correct sector.

dvdnav_sector_search() already checks for BLOCK_TYPE_ANGLE_BLOCK
cells in calculating the new position but dvdnav_get_position()
did not. As dvdnav_sector_search() starts by calling
dvdnav_get_position() the end result for the new position could
be wrong.

5 years agoSkip PGCs w/ a cell number of 0
Erik Hovland [Thu, 30 Aug 2012 21:31:49 +0000 (14:31 -0700)]
Skip PGCs w/ a cell number of 0

If the cell number is 0 dvdnav will crash w/ a SIGBUS. Check the cell
number before this can happen and just continue.

5 years agoIgnore parts where the pgc start byte is above the last byte
Erik Hovland [Thu, 30 Aug 2012 21:29:51 +0000 (14:29 -0700)]
Ignore parts where the pgc start byte is above the last byte

If the start byte is in the wrong place then dvdnav can crash because it
is out of bounds.

5 years agoMake sure pgc is valid before dereferencing.
Erik Hovland [Thu, 30 Aug 2012 21:27:32 +0000 (14:27 -0700)]
Make sure pgc is valid before dereferencing.

The pgc pointer might be null when it is retrieved from the IFO. This
can cause a segfault when pgc is dereferenced a few lines later.

5 years agoCheck that a VOB is open in case we need to open one
Erik Hovland [Thu, 24 May 2012 21:41:19 +0000 (14:41 -0700)]
Check that a VOB is open in case we need to open one

If a VOB is not open we will dereference a null pointer in
DVDReadBlocks. That will produce a segfault. If we check for an open VOB
when we check to see if we need to change the currently open VOB we can
ensure that a VOB is open when DVDReadBlocks dereferences it.

This patch supplied by John Stebbins <stebbins AT jetheaddev DOT com>.

5 years agoAdds a function to create a dpu of a dvdnav handle
Erik Hovland [Mon, 21 May 2012 23:41:55 +0000 (16:41 -0700)]
Adds a function to create a dpu of a dvdnav handle

This adds a function to create a duplicate of a dvdnav handle and it's
state. This allows you to recursively move through the handle. HandBrake
uses these functions to do recursive automated search of the menus for
something that looks like the main feature.

5 years agoReset the vm if necessary.
Erik Hovland [Mon, 21 May 2012 23:34:22 +0000 (16:34 -0700)]
Reset the vm if necessary.

When vm_start is called it should check to see if the vm is stopped. If
it is, reset it and marked the vm as started (set vm->stopped to zero).

5 years agoUse vm_close() w/in vm.c where appropriate
Erik Hovland [Mon, 21 May 2012 23:32:31 +0000 (16:32 -0700)]
Use vm_close() w/in vm.c where appropriate

Replace vm_stop() w/ vm_close() where necessary.

5 years agoAdd the static function vm_close()
Erik Hovland [Mon, 21 May 2012 23:23:29 +0000 (16:23 -0700)]
Add the static function vm_close()

It is convenient to have vm_stop() have different processing when called
by other parts of the library. When vm_stop is changed in this way, it
means that the vm needs to be able to do the same processing internally.
The introduction of the static function vm_close() provides that

5 years agoAdd in endian detection to configure2
Erik Hovland [Mon, 30 Apr 2012 18:43:46 +0000 (11:43 -0700)]
Add in endian detection to configure2

libdvdnav's configure2 lacked endian detection. This problem was pointed
out by Ganael Laplanche <ganael DOT laplanche AT martymac DOT org>
through a patch that he submitted to fix this issue (and others) for the
BSDs. Thanks!

5 years agocheck pkg-config before xxx-config scripts
Erik Hovland [Tue, 17 Apr 2012 20:48:50 +0000 (13:48 -0700)]
check pkg-config before xxx-config scripts

It's easier to manage pkg-config when cross-compiling, and libdvdread
installs .pc files, so check those first.

Patch provided by Mike Frysinger <vapier AT gentoo DOT org>, Thanks!

5 years agolibdvdnavmini depends on libdvdread
Erik Hovland [Tue, 17 Apr 2012 18:36:11 +0000 (11:36 -0700)]
libdvdnavmini depends on libdvdread

This patch fixes the following error messages one might get when
building libdvdnav on W32 using MinGW:

libtool: link:  gcc -shared .libs/libdvdnavmini-4.dll.def
.libs/dvdnav.o .libs/read_cache.o .libs/navigation.o .libs/highlight.o
.libs/searching.o .libs/settings.o .libs/remap.o  -Wl,--whole-archive
../src/vm/.libs/libdvdvm.a -Wl,--no-whole-archive   -O3 -march=i686
- -o .libs/libdvdnavmini-4.dll -Wl,--enable-auto-image-base -Xlinker
- --out-implib -Xlinker .libs/libdvdnavmini.dll.a
Creating library file:
undefined reference to `DVDCloseFile'

Patch provided by LRN <lrn1986 AT gmail DOT com>, Thanks!

5 years agoCheck cell new row before using it to index into cell_playback
Erik Hovland [Mon, 16 Apr 2012 21:56:43 +0000 (14:56 -0700)]
Check cell new row before using it to index into cell_playback

cellnr is used to index into cell_playback after subtracting
one from it. If cellnr is 0, then it will index -1 in cell_playback
which will seek out of boundary of cell_playback. This manifested into a
segfault for some users as reported by this launchpad bug:

By checking cellnr and skipping the indexing if cellnr is equal to zero
then we avoid the segfault. There might be a bigger issue w/ regard to
retrieving a value of zero for cell new row, but this fix works for the

Thanks goes to Sylvain Henry (hsyl20 AT gmail DOT com for both
reporting the bug to launchpad and submitting a potential patch (even
though we went w/ a different fix).

5 years agoPrevent overflow by pre-casting to int64_t
Erik Hovland [Tue, 14 Feb 2012 19:05:34 +0000 (11:05 -0800)]
Prevent overflow by pre-casting to int64_t

When converting to ticks it is possible for the first value to overflow.
We can prevent this overflow if we cast the first value to int64_t
before multiplying. This will cause the compiler to use int64_t as the
base type for the operations.

5 years agoCheck the return value of dvd_read_name
Erik Hovland [Wed, 30 Nov 2011 21:05:05 +0000 (13:05 -0800)]
Check the return value of dvd_read_name

Now that dvd_read_name returns a status code we can check it before
calling remap_loadmap.

5 years agoRewrite dvd_read_name to return a value
Erik Hovland [Wed, 30 Nov 2011 18:51:02 +0000 (10:51 -0800)]
Rewrite dvd_read_name to return a value

dvd_read_name has several places where it can fail. Since it doesn't
return a value it can't communicate that to any callers. This commit
changes the function so it does all of the same work but it checks every
possible failure point.

5 years agoPrevent general CPP macro from causing strange behavior.
Erik Hovland [Wed, 30 Nov 2011 18:25:32 +0000 (10:25 -0800)]
Prevent general CPP macro from causing strange behavior.

Roger Pack reported that when playing the DVD "Tangled"
w/ mplayer and recent libdvdnav, mplayer crashes w/ the error message:
Assertion failed: (vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_mode != 0, file libdvdnav/vm/vm.c, line 1141

This line should only be triggered when a developer wants a "strict"
build of the library. Most likely using the very general term
STRICT to #ifdef this clause is what is causing this issue. This
patch adds a DVDNAV_ in front of the strict to prevent the
macro from being enabled accidentally.

5 years agoRemove unneeded address-of of CLUT
Erik Hovland [Sat, 12 Nov 2011 20:15:44 +0000 (12:15 -0800)]
Remove unneeded address-of of CLUT

The CLUT that is copied in from struct variable palette is an
array of 16 values. So the &(palette) is unnecessary. The size
argument was also changed to use the palette array instead of
the type (just in case palette ever gets changed).

Thanks goes to Lee Essen who originally submitted the patch
way back in 2008 and to Roger Pack who brought the patch to
our attention recently.

5 years agoInitialize next_vobu.
Erik Hovland [Mon, 31 Oct 2011 21:09:01 +0000 (14:09 -0700)]
Initialize next_vobu.

It is possible (although unlikely) that the while loop will
never execute and next_vobu will be uninitialized at this point.

5 years agoRework functions that call vm_copy_vm()
Erik Hovland [Mon, 31 Oct 2011 21:07:19 +0000 (14:07 -0700)]
Rework functions that call vm_copy_vm()

Once vm_new_vm() can return NULL and doesn't assert then the functions
that call vm_copy_vm() need to be able to handle this issue.

5 years agoReplace assert w/ a conditional and a null return
Erik Hovland [Mon, 31 Oct 2011 20:58:06 +0000 (13:58 -0700)]
Replace assert w/ a conditional and a null return

5 years agoReplace assert w/ a conditional and a null return
Erik Hovland [Mon, 31 Oct 2011 20:57:03 +0000 (13:57 -0700)]
Replace assert w/ a conditional and a null return

5 years agoReindent a couple of lines to make them more readable
Erik Hovland [Mon, 31 Oct 2011 20:46:03 +0000 (13:46 -0700)]
Reindent a couple of lines to make them more readable

5 years agoRemove unused variable and its assignment
Erik Hovland [Mon, 31 Oct 2011 20:45:15 +0000 (13:45 -0700)]
Remove unused variable and its assignment

5 years agoInitialize link_values
Erik Hovland [Mon, 31 Oct 2011 20:35:27 +0000 (13:35 -0700)]
Initialize link_values

5 years agoRemove commented out asserts
Erik Hovland [Mon, 10 Oct 2011 18:21:18 +0000 (11:21 -0700)]
Remove commented out asserts

5 years agoTest still like a boolean value and not an integer value
Erik Hovland [Mon, 10 Oct 2011 18:19:55 +0000 (11:19 -0700)]
Test still like a boolean value and not an integer value

5 years agoReformat for proper indentation
Erik Hovland [Mon, 10 Oct 2011 18:12:50 +0000 (11:12 -0700)]
Reformat for proper indentation

5 years agoAlways check whether a still is being handled.
Erik Hovland [Mon, 10 Oct 2011 18:08:03 +0000 (11:08 -0700)]
Always check whether a still is being handled.

When a new cell is encountered dvdnav indicates it should wait
for sync. However it does not advance to the next cell. Instead it
assumes that there are only still frames. By removing the else
part of the if clause dvdnav will always at least advance to the
next cell because it is no longer assuming that it is on a still

5 years agoInitialize epos
Erik Hovland [Tue, 23 Nov 2010 23:38:58 +0000 (15:38 -0800)]
Initialize epos

5 years agoPointer validation fixing
Erik Hovland [Thu, 24 Jun 2010 22:50:46 +0000 (15:50 -0700)]
Pointer validation fixing

The files in question lack pointer checking in some way.

5 years agoFix strict aliasing warnings.
Dominik Mierzejewski [Sun, 9 Dec 2012 21:45:02 +0000 (21:45 +0000)]
Fix strict aliasing warnings.

Patch by Reimar Döffinger \

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

5 years agoRestore C++ compatibility by renaming the parameter to 'self' like in
Dominik Mierzejewski [Sun, 9 Dec 2012 21:39:37 +0000 (21:39 +0000)]
Restore C++ compatibility by renaming the parameter to 'self' like in
the other functions.

Revision 1208 ("Add dvdnav_program_play & dvdnav_current_title_program")
added dvdnav_program_play function to dvdnav.h. However, unlike the
other API functions, its first parameter is named 'this' instead of
'self'. 'this' is a C++ keyword and prevents compilation of C++ projects
using libdvdnav.

Patch by Anssi Hannula \

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

5 years agoMake sure we get nav packets for all cells in multi angle features
Dominik Mierzejewski [Sun, 9 Dec 2012 21:22:15 +0000 (21:22 +0000)]
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.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

5 years agoFix failed assertion when there's no menu.
Dominik Mierzejewski [Sun, 9 Dec 2012 21:13:14 +0000 (21:13 +0000)]
Fix failed assertion when there's no menu.

Patch by Erik Hovland.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoUpdate version number in changelogs.
Dominik Mierzejewski [Sat, 8 Oct 2011 22:04:05 +0000 (22:04 +0000)]
Update version number in changelogs.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoPoint project website URL to the new location.
Dominik Mierzejewski [Sat, 8 Oct 2011 21:49:29 +0000 (21:49 +0000)]
Point project website URL to the new location.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoBump version to 4.2.0 for release.
Dominik Mierzejewski [Fri, 7 Oct 2011 20:20:59 +0000 (20:20 +0000)]
Bump version to 4.2.0 for release.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoMention guaranteed forward seeks in the ChangeLog.
Dominik Mierzejewski [Fri, 7 Oct 2011 20:16:41 +0000 (20:16 +0000)]
Mention guaranteed forward seeks in the ChangeLog.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoAlways attempt to move forward on a seek
Erik Hovland [Fri, 7 Oct 2011 17:06:24 +0000 (17:06 +0000)]
Always attempt to move forward on a seek

From John Stebbins original post (with pathc, Thanks!):
libdvdnav has a problem in that it is difficult to gracefully recover
from a read error and continue on to subsequent blocks on the disc.  An
application would like to seek forward past the current block after
getting a read error in order to attempt to get past the bad block(s).
But dvdnav_sector_search() does not guarantee that a requested forward
seek will actually move the current position forward.  It truncates down
to the nearest VOBU which will almost always cause a forward seek
request by a single block (or a small number of blocks) to move the
current position backward.  This behaviour puts the application into a
loop of: read failure, attempted forward seek (which results in backward
seek), read failure ...

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoUpdate changelog.
Dominik Mierzejewski [Thu, 6 Oct 2011 16:09:55 +0000 (16:09 +0000)]
Update changelog.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoDo not use non-standard sys/fcntl.h include, use just fcntl.h
Reimar Döffinger [Sat, 11 Jun 2011 15:42:20 +0000 (15:42 +0000)]
Do not use non-standard sys/fcntl.h include, use just fcntl.h

This also matches the already existing include in vm/vm.c.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix typos in comments
Erik Hovland [Sun, 20 Mar 2011 18:06:39 +0000 (18:06 +0000)]
Fix typos in comments

Mike Castle <dalgoda PLUS mplayer AT gmail DOT com> continues his
excellent job of finding issues in the comments. This patch has two
fixes for typos. Thanks Mike!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix grammar in dvdnav.h
Erik Hovland [Sat, 26 Feb 2011 20:32:32 +0000 (20:32 +0000)]
Fix grammar in dvdnav.h

Mike Castle <dalgoda PLUS mplayer AT gmail DOT com> found a few grammar
issues in dvdnav.h.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix typos
Erik Hovland [Sat, 12 Feb 2011 20:29:58 +0000 (20:29 +0000)]
Fix typos

Mike Castle kindly sent a patch to fix a few typos in dvdnav.h.
Thanks Mike!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

7 years agoPrevent abort if a menu doesn't exist.
Erik Hovland [Sun, 21 Nov 2010 23:59:43 +0000 (23:59 +0000)]
Prevent abort if a menu doesn't exist.

From John Stebbins original email on the patch:
This patch prevents an abort when a nav command tries to send you to a
menu that doesn't exist. Mac the ripper's feature title extraction
removes menus from the resulting image, but does not remove navigation
instructions that attempt to jump to those menus. This patch checks that
a menu exists before acting on such  instructions. If the menu does not
exist, it puts the vm into the stopped state.

Thanks goes to John Stebbins for the original send of this patch and
noticing that I introduced a bug when attempting to streamline this
patch. Finally, he has guided this patch and many more for an
extended period of time. Thanks again John.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoIf there is no VMGI or PGCI return instead of try to get them
Erik Hovland [Fri, 30 Jul 2010 23:34:24 +0000 (23:34 +0000)]
If there is no VMGI or PGCI return instead of try to get them

If there is no menu there isn't much point in trying to jump to them.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoRemove the special case test for uid=0
Erik Hovland [Fri, 30 Jul 2010 23:34:21 +0000 (23:34 +0000)]
Remove the special case test for uid=0

Some package tools run configure as fakeroot.  This triggers code in that detects uid 0 to hardcode the installation path of the
m4 macros to the system aclocal macro dir.  This ignores any DESTDIR the
packaging tools may have set and installation fails since it attempts to
write to a system dir without proper permissions. Patch submitted by
John Stebbins <stebbins AT jetheaddev DOT com>. Thanks!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoFix a spelling error in the comments
Erik Hovland [Fri, 30 Jul 2010 23:34:19 +0000 (23:34 +0000)]
Fix a spelling error in the comments

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoAdd dvdnav_program_play & dvdnav_current_title_program
Erik Hovland [Fri, 30 Jul 2010 23:34:16 +0000 (23:34 +0000)]
Add dvdnav_program_play & dvdnav_current_title_program

Using title parts w/ dvdnav_part_play and dvdnav_current_title_info
is not reliable for use as chapter marks in files made from
transcoding. The start of a part does not necessarily fall strictly
inside the main title. Parts can have an intro sequence before
getting into the title. So we use program boundaries instead of
part markers to test when we have reached a chapter point during
encoding of the title. The same would apply to displaying the
current chapter during playback. The program boundaries
should be checked instead of looking for a part.

Patch from John Stebbins. Thanks!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoMake sure part is initialized
Erik Hovland [Fri, 30 Jul 2010 23:34:13 +0000 (23:34 +0000)]
Make sure part is initialized

part can be left untouched by vm_get_current_title. Having it be
uninitialized and assigned to PTTN_REG would likely be a bad idea.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoPrevent deadlock in dvdnav_reset
Erik Hovland [Fri, 30 Jul 2010 23:34:11 +0000 (23:34 +0000)]
Prevent deadlock in dvdnav_reset

dvdnav_reset takes a lock and then calls dvdnav_clear (which
also takes the same lock). This causes a deadlock. If the lock
is released before dvdnav_clear is called, all is well.

Derived from a patch submitted by John Stebbins. Thanks!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoClear all of position_current
Erik Hovland [Fri, 30 Jul 2010 23:34:08 +0000 (23:34 +0000)]
Clear all of position_current

In dvdnav_clear the only thing cleared of position_current is
one member. Instead clear the whole thing.

This is derived from a patch submitted by John Stebbins. Thanks!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agologs belong to stderr, not stdout; patch by John Stebbins
Nico Sabbi [Tue, 1 Jun 2010 10:02:38 +0000 (10:02 +0000)]
logs belong to stderr, not stdout; patch by John Stebbins

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoPrevent display of garbage volume label when the file being scanned is
Nico Sabbi [Tue, 1 Jun 2010 10:01:33 +0000 (10:01 +0000)]
Prevent display of garbage volume label when the file being scanned is
not a dvd. This is a simple movement of the code that logs the volume
name to after the point that some basic validation of the disc has been

Patch by John Stebbins of Handbrake

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoin vm:c set_PGN removed restriction that didn't play multi-PGC titles; patch by John...
Nico Sabbi [Tue, 1 Jun 2010 08:17:15 +0000 (08:17 +0000)]
in vm:c set_PGN removed restriction that didn't play multi-PGC titles; patch by John Stebbins

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoFix pthread_mutex_destroy macro for Win32
Erik Hovland [Thu, 27 May 2010 15:26:27 +0000 (15:26 +0000)]
Fix pthread_mutex_destroy macro for Win32

Win32 has a DestroyCriticalSection call that is the equivalent
to pthread_mutex_destroy. The macro for the Win32 port should
have this.

The VLC project fixed the Win32 macro for pthread_mutex_destroy
about 3 years ago. So this is a well tested patch according to

Thanks goes to Jean-Baptiste for submitting this patch to the
dvdnav-discuss list.

Patch by Jean-Baptiste Kempf /jb*videolan#org\

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoProvide a way to retrieve video resolution.
Dominik Mierzejewski [Tue, 25 May 2010 23:33:59 +0000 (23:33 +0000)]
Provide a way to retrieve video resolution.
Needed for correct aspect ratio support in VLC.

Patch by Jean-Baptiste Kempf /jb*videolan#org\

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

8 years agoUpdate ChangeLog for next release.
Dominik Mierzejewski [Sat, 14 Nov 2009 21:03:35 +0000 (21:03 +0000)]
Update ChangeLog for next release.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agobump version due to dvdnav_get_serial_string addition
Dominik Mierzejewski [Sat, 26 Sep 2009 22:44:38 +0000 (22:44 +0000)]
bump version due to dvdnav_get_serial_string addition

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoCosmetic change only - os2_open
Erik Hovland [Sun, 6 Sep 2009 15:26:43 +0000 (15:26 +0000)]
Cosmetic change only - os2_open

os2_open() doesn't look like the rest of the code. And since we just
updated it, it probably should look like the rest of the code.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoOS/2 portability fix
Erik Hovland [Sun, 6 Sep 2009 15:26:39 +0000 (15:26 +0000)]
OS/2 portability fix

This commit only touches the OS/2 port. The function os2_open is changed
to perform the large file open call instead of the regular file open
call. And there is a setmode call to explicitly set the DOS file mode
to binary. This commit is directly from the patch sent in by
KO Myung-Hun <komh AT chollian DOT net>. Thanks!

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoin dvdnav_describe_chapters() ifo could be leaked in case of erros; fixed by Erik...
Nico Sabbi [Wed, 22 Apr 2009 07:40:57 +0000 (07:40 +0000)]
in dvdnav_describe_chapters() ifo could be leaked in case of erros; fixed by Erik Hovland

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoimplement and export dvdnav_get_serial_string(); patch by Matthew Wire devel - mrwire...
Nico Sabbi [Mon, 2 Feb 2009 22:55:58 +0000 (22:55 +0000)]
implement and export dvdnav_get_serial_string(); patch by Matthew Wire devel - mrwire - co - uk. Fixed by Erik

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoIgnore generated .d files.
Diego Biurrun [Mon, 12 Jan 2009 12:10:32 +0000 (12:10 +0000)]
Ignore generated .d files.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoFix compilation of menus.c example after headers were moved.
Reimar Döffinger [Wed, 7 Jan 2009 18:03:06 +0000 (18:03 +0000)]
Fix compilation of menus.c example after headers were moved.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

9 years agoMove dvd_types.h, dvdnav_events.h and dvdnav.h into a dvdnav directory.
Reimar Döffinger [Tue, 30 Dec 2008 14:48:46 +0000 (14:48 +0000)]
Move dvd_types.h, dvdnav_events.h and dvdnav.h into a dvdnav directory.
This allows getting rid of the DVDNAV_COMPILE define hack and makes
it easier to use the library without installing or integrating the
source into some other project directly.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoAllow specifying the DVD device as program argument.
Diego Biurrun [Thu, 9 Oct 2008 22:24:53 +0000 (22:24 +0000)]
Allow specifying the DVD device as program argument.
patch by KO Myung-Hun, komh chollian net

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoOS/2 support by KO Myung-Hun, komh chollian net
Diego Biurrun [Thu, 9 Oct 2008 22:20:36 +0000 (22:20 +0000)]
OS/2 support by KO Myung-Hun, komh chollian net

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agocosmetics: Remove all trailing whitespace.
Diego Biurrun [Thu, 9 Oct 2008 22:20:01 +0000 (22:20 +0000)]
cosmetics: Remove all trailing whitespace.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoRemove executable property from non-executable files.
Diego Biurrun [Sun, 14 Sep 2008 21:10:59 +0000 (21:10 +0000)]
Remove executable property from non-executable files.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoRemove useless $Id$ and $Name$ keywords.
Diego Biurrun [Sun, 14 Sep 2008 20:31:43 +0000 (20:31 +0000)]
Remove useless $Id$ and $Name$ keywords.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoUse consistent multiple inclusion guards everywhere:
Diego Biurrun [Sun, 14 Sep 2008 20:11:17 +0000 (20:11 +0000)]
Use consistent multiple inclusion guards everywhere:
Combine them from a LIBDVDNAV_ prefix and the filename.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoConvert all ISO8859-1 sequences to proper UTF-8.
Diego Biurrun [Sun, 14 Sep 2008 16:05:09 +0000 (16:05 +0000)]
Convert all ISO8859-1 sequences to proper UTF-8.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoUse consistent license headers everywhere: Fix wrong FSF address.
Diego Biurrun [Sun, 14 Sep 2008 15:40:51 +0000 (15:40 +0000)]
Use consistent license headers everywhere: Fix wrong FSF address.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoMention pkgconfig support.
Dominik Mierzejewski [Sun, 7 Sep 2008 12:36:15 +0000 (12:36 +0000)]
Mention pkgconfig support.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoRemove all trailing whitespace,
Dominik Mierzejewski [Sat, 6 Sep 2008 21:55:51 +0000 (21:55 +0000)]
Remove all trailing  whitespace,
patch by Erik Hovland *erik$hovland dot org%

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoA variable assignment is missing a lock around it.
Dominik Mierzejewski [Sun, 31 Aug 2008 18:13:23 +0000 (18:13 +0000)]
A variable assignment is missing a lock around it.
All other accesses are locked.

Patch by Erik Hovland %erik!hovland dot org*

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907

10 years agoFix parallel make builds and set proper dependencies
Dominik Mierzejewski [Sun, 31 Aug 2008 09:27:37 +0000 (09:27 +0000)]
Fix parallel make builds and set proper dependencies
on generated files.

git-svn-id: svn:// 625a9de0-492d-0410-920c-a7e632af1907