videolan:dondiegos-libdvdread.git
4 years agoFix pkg-config file for libdvdread when linking in libdvdcss
Brad Smith [Mon, 11 Mar 2013 03:12:33 +0000 (23:12 -0400)]
Fix pkg-config file for libdvdread when linking in libdvdcss

I don't see a VLC libdvdread list so I am sending this directly
to you..

I noticed support for linking to libdvdcss to libdvdread was
added. This fixes the pkg-config file to link in libdvdcss
to the respect project only when not using shared libs.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
4 years agoAdd an error message
Erik Hovland [Tue, 5 Feb 2013 17:48:10 +0000 (18:48 +0100)]
Add an error message

4 years agoUpdate src/ifo_print.c
Benjamin Kerensa [Fri, 4 Jan 2013 19:10:43 +0000 (11:10 -0800)]
Update src/ifo_print.c

Fix Spelling: Address table not Adress table.

4 years agoImprove dlopen support on mingw
John Stebbins [Tue, 16 Oct 2012 17:45:50 +0000 (10:45 -0700)]
Improve dlopen support on mingw

Not all mingw build environments have libdl.  And those that do often
only have it in dll form which would have to be distributed with the
application.  So allowing use of the builtin version of dlopen in
dvdread is useful. This patch does the right thing if dlopen is not
found on the system and it adds a configure option to force use of the
builtin dlopen.

It also seems that building dlopen broke at some point.  #includes
pointing to the wrong places.

4 years agoMake sure the input device is closed on failure.
Erik Hovland [Mon, 21 May 2012 23:04:21 +0000 (16:04 -0700)]
Make sure the input device is closed on failure.

In the error path, the dvd input device is not cleaned when the error
path is traversed.

4 years agoBelieve config.h instead of trying to detect endianness
Ganael Laplanche [Mon, 30 Apr 2012 18:37:16 +0000 (11:37 -0700)]
Believe config.h instead of trying to detect endianness

A few macros in md5.c were in that file trying to detect endian when
that wasn't necessary. config.h should already know what endian the
compilation is for. This commit uses config.h instead.

4 years agoFix endian detection output
Erik Hovland [Mon, 30 Apr 2012 18:34:43 +0000 (11:34 -0700)]
Fix endian detection output

When bigendian was detected it was not being written to config.h because
the test lacked the file output redirection.

4 years agoRemove dvdread_incdir
Erik Hovland [Mon, 30 Apr 2012 18:22:30 +0000 (11:22 -0700)]
Remove dvdread_incdir

dvdread_incdir is redundant when configure2 already has incdir and it
seems that naming convention is more in-line w/ the rest of the script.

4 years agoFix mount point -> device name on OSX
Rafaël Carré [Tue, 17 Apr 2012 19:03:43 +0000 (12:03 -0700)]
Fix mount point -> device name on OSX

getfsent() only returns '/' entry on my system (10.8)

I only have 10.7 around to test, but this bug was reported ages ago:
https://trac.videolan.org/vlc/ticket/4069

I don't have a BSD, so I can't test it on BSD too but I don't see why
this code couldn't be shared on all BSD.

4 years agolibdvdread uses internal dlfcn on W32, unconditionally
LRM [Tue, 17 Apr 2012 17:40:41 +0000 (10:40 -0700)]
libdvdread uses internal dlfcn on W32, unconditionally

On W32 libdvdread unconditionally uses msvc/contrib/dlfcn.c
While this allows libdvdread to be compiled out of the box, it
prevents it from linking to any other dlfcn implementation. Namely -
to dlfcn-win32 [1] (which is somewhat more POSIX-compliant).

The attached patch is very simplistic (i.e. it unconditionally
requires a working libdl somewhere), but it works for me. For trunk i
would suggest re-writing it like this:
check for dlopen in -lc
 if that fails, check for dlopen in -ld
   if that fails AND host is mingw, modify CFLAGS to use internal dlfcn

Note that LDFLAGS modification should go AFTER (!) all AC_CHECK_LIB
calls, because -no-undefined is no longer valid as a compiler option.

[1] http://code.google.com/p/dlfcn-win32/

4 years agoAdd --enable-libdvdcss to the autotools install
Rafaël Carré [Wed, 30 Nov 2011 21:41:31 +0000 (13:41 -0800)]
Add --enable-libdvdcss to the autotools install

This commit adds the argument --enable-libdvdcss (off by default). When
used it directly links libdvdcss into libdvdread. This prevents
libdvdread from having to use dlopen() to get at the libdvdcss
functions.

Currently this feature is used when building VLC for mingw32 and darwin.

4 years agodvd_udf.h and bitreader.h are not in src
KO Myung-Hun [Thu, 17 Nov 2011 00:25:08 +0000 (16:25 -0800)]
dvd_udf.h and bitreader.h are not in src

dvd_udf.h and bitreader.h are not in src. Due to this, 'make distdir'
fails.

4 years agoRemove an over aggressive 0 -> NULL change
Erik Hovland [Tue, 15 Nov 2011 00:46:13 +0000 (16:46 -0800)]
Remove an over aggressive 0 -> NULL change

4 years agoComment to explain the need of config.h
Erik Hovland [Tue, 15 Nov 2011 00:38:45 +0000 (16:38 -0800)]
Comment to explain the need of config.h

4 years agoReplace tab w/ spaces
Erik Hovland [Tue, 15 Nov 2011 00:34:35 +0000 (16:34 -0800)]
Replace tab w/ spaces

4 years agoSanitize PTT start offsets
John Stebbins [Sat, 12 Nov 2011 20:29:23 +0000 (12:29 -0800)]
Sanitize PTT start offsets

If the start offset points past the last_byte (outside the region read) stop
reading PTTs and adjust nr_of_srpts.

Fixes Transformers 3.

4 years agoUpdate the TODO file
Erik Hovland [Mon, 10 Oct 2011 22:49:49 +0000 (15:49 -0700)]
Update the TODO file

4 years agoUse NULL instead of 0, this is C kids
Erik Hovland [Mon, 10 Oct 2011 22:08:24 +0000 (15:08 -0700)]
Use NULL instead of 0, this is C kids

4 years agoCheck ifoRead_VTS before continuing
Erik Hovland [Mon, 10 Oct 2011 22:07:14 +0000 (15:07 -0700)]
Check ifoRead_VTS before continuing

4 years agoClear pf_temp to make sure it is initialized
Erik Hovland [Mon, 10 Oct 2011 21:59:04 +0000 (14:59 -0700)]
Clear pf_temp to make sure it is initialized

4 years agoCheck the return value for potential errors
Erik Hovland [Thu, 24 Jun 2010 22:03:03 +0000 (15:03 -0700)]
Check the return value for potential errors

4 years agoRemove erroneous free().
Ingo Brückl [Wed, 12 Dec 2012 14:21:16 +0000 (14:21 +0000)]
Remove erroneous free().

The address operator is wrong and the memory actually meant
to be freed has already been freed by ifoFree_PGC() anyway.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1250 625a9de0-492d-0410-920c-a7e632af1907

4 years agoThis patch fixes a segmentation fault hit when reading the DVD 'The
Dominik Mierzejewski [Sun, 9 Dec 2012 22:03:38 +0000 (22:03 +0000)]
This patch fixes a segmentation fault hit when reading the DVD 'The
Express'.  It prevents a read/write beyond end of an array due to using
a length value taken from the DVD, which can exceed the allocated size.

https://bugs.launchpad.net/ubuntu/+source/libdvdread/+bug/894170

The patch was originally written by rickyrockrat (sorry, I don't have
his email address) for 4.1.3.  I got the DVD and reproduced the segfault
using 4.2.0 and verified the patch stops the segfault from happening.
We're not confident this is the best fix though, so are posting it here
for review.

Signed-off-by: Bryce Harrington <bryce@canonical.com>
git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1249 625a9de0-492d-0410-920c-a7e632af1907

4 years agoAccommodate duplicate language units and pgcs.
Dominik Mierzejewski [Sun, 9 Dec 2012 21:07:59 +0000 (21:07 +0000)]
Accommodate duplicate language units and pgcs.

Many dvd's are showing up that have titles that have numerous repeated
language unit tables and pgc's. The new release "Up" is an example.  I
believe "Dark Knight" also exhibits this. When scanning such discs
with lsdvd (and other programs that scan all titles), libdvdread will
consume many GB of data for these repeated elements and gets very slow
(e.g hours to read all titles) on OS X due to reading the duplicate
data from uncached raw devices.

This patch detects duplicates and reference counts pgc's and pgcit's.
When a duplicate is detected, a reference count is incremented instead
of allocating new memory and re-reading the data.

Patch by John Stebbins.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1244 625a9de0-492d-0410-920c-a7e632af1907

5 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1243 625a9de0-492d-0410-920c-a7e632af1907

5 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1242 625a9de0-492d-0410-920c-a7e632af1907

5 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1241 625a9de0-492d-0410-920c-a7e632af1907

5 years agoUse NULL instead of 0 consistently.
Erik Hovland [Fri, 7 Oct 2011 16:56:02 +0000 (16:56 +0000)]
Use NULL instead of 0 consistently.

Since this is C and not C++, NULL is the stylistic choice
for pointer assignments and checking. This patch, kindly submitted
by Frederic Marchal <fmarchal AT perso DOT be> changes all of
places were ptl_mait is used in ifo_read.c. Thanks!

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1238 625a9de0-492d-0410-920c-a7e632af1907

5 years agoFix memory leaks.
Dominik Mierzejewski [Thu, 6 Oct 2011 21:02:00 +0000 (21:02 +0000)]
Fix memory leaks.

Patch by Rémi Duraffort ^ivoire#videolan*org!

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1237 625a9de0-492d-0410-920c-a7e632af1907

5 years agoUpdate ChangeLog.
Dominik Mierzejewski [Thu, 6 Oct 2011 17:23:06 +0000 (17:23 +0000)]
Update ChangeLog.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1236 625a9de0-492d-0410-920c-a7e632af1907

5 years agoFix segfault when reading certain DVDs, for example "Thor".
Dominik Mierzejewski [Thu, 6 Oct 2011 12:10:01 +0000 (12:10 +0000)]
Fix segfault when reading certain DVDs, for example "Thor".
This results from a new anti-copy scheme where the real video_ts.ifo
is hidden. Use of the decoy video_ts.ifo results in a unplayable DVD.

Patch by Alexander Roalter \alex!roalter*it/.

Verified by John Stebbins |stebbins%jethaddev&com|.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1234 625a9de0-492d-0410-920c-a7e632af1907

6 years agoMake sure vts_ptt_srpt->title is freed
Erik Hovland [Sat, 13 Aug 2011 17:28:48 +0000 (17:28 +0000)]
Make sure vts_ptt_srpt->title is freed

title was being leaked when the error path is hit in this function.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1233 625a9de0-492d-0410-920c-a7e632af1907

6 years agoFix crash when PTT is too short
Erik Hovland [Sat, 13 Aug 2011 17:28:45 +0000 (17:28 +0000)]
Fix crash when PTT is too short

The PTT that is allocated and read is smaller than what gets referenced.
The data is byte-swapped in place which results in writes to memory
locations outside the allocated region. Region 1 True Grit is an
example of this.

Derived from a patch submitted by John Stebbins. Thanks!

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1232 625a9de0-492d-0410-920c-a7e632af1907

6 years agoConditional style change
Erik Hovland [Sat, 13 Aug 2011 17:28:43 +0000 (17:28 +0000)]
Conditional style change

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1231 625a9de0-492d-0410-920c-a7e632af1907

6 years agoClean up error paths.
Erik Hovland [Sat, 13 Aug 2011 17:28:40 +0000 (17:28 +0000)]
Clean up error paths.

Clean up the error paths of the function using goto.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1230 625a9de0-492d-0410-920c-a7e632af1907

6 years agoClean up malloc calls
Erik Hovland [Sat, 13 Aug 2011 17:28:37 +0000 (17:28 +0000)]
Clean up malloc calls

Both malloc calls have a cast to the type of the pointer's
type. This is not necessary in C and is poor style.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1229 625a9de0-492d-0410-920c-a7e632af1907

6 years agoReplace deprecated MOUNTED with _PATH_MOUNTED.
Reimar Döffinger [Wed, 15 Jun 2011 18:09:15 +0000 (18:09 +0000)]
Replace deprecated MOUNTED with _PATH_MOUNTED.

This has the side-effect of fixing compilation with Android compiler.
(I am not aware of any good reason to compile libdvdread for Android though)

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1228 625a9de0-492d-0410-920c-a7e632af1907

6 years agoUse a single = instead of ==
Erik Hovland [Sat, 12 Feb 2011 20:30:23 +0000 (20:30 +0000)]
Use a single = instead of ==

test in the bourne shell and its derivatives actually specifies
= as the test for equality. == was accepted for a long time. But
dash does not. configure2 used == for a test. Which caused debian
to break if dash is used. This changes it to =. Patch and testing
provided by Mike Castle (dalgoda+mplayer AT gmail DOT com). Thanks
Mike!

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1224 625a9de0-492d-0410-920c-a7e632af1907

6 years agoReport which index failed reading
Erik Hovland [Sun, 30 Jan 2011 23:44:16 +0000 (23:44 +0000)]
Report which index failed reading

When reading the parental management information, report what
index if that read failed. This should improve error reporting.
Patch submitted by Frederic Marchal, fmarchal at perso dot be.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1222 625a9de0-492d-0410-920c-a7e632af1907

6 years agoReplaces the hard-coded values
Erik Hovland [Sun, 30 Jan 2011 23:44:13 +0000 (23:44 +0000)]
Replaces the hard-coded values

The parental management structure has ratings levels. The size
of the bit mask is constant but magic values were being used
instead of named constants. This commit changes them to named
constants. This is based on a patch submitted by Frederic Marchal,
fmarchal at perso dot be. Thanks for this tidy cleanup.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1221 625a9de0-492d-0410-920c-a7e632af1907

6 years agoInhibit double free of parental management information
Erik Hovland [Sun, 30 Jan 2011 23:44:09 +0000 (23:44 +0000)]
Inhibit double free of parental management information

If reading the country data fails the point to the parental
management information is not nulled out. So it is possible for
the same structure to be freed twice. To inhibit this whenever
the country data read fails the structure pointer is assigned
null. Patch submitted by Frederic Marchal, fmarchal at
perso dot be. Thanks for being patient and reworking the patch
when requested.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1220 625a9de0-492d-0410-920c-a7e632af1907

7 years agoMove UDFReadBlocksRaw declaration to dvdread_internal.h.
Diego Biurrun [Sat, 11 Sep 2010 15:15:43 +0000 (15:15 +0000)]
Move UDFReadBlocksRaw declaration to dvdread_internal.h.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1218 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix some spelling issues
Reinhard Tartler [Sun, 8 Aug 2010 22:49:28 +0000 (22:49 +0000)]
Fix some spelling issues

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1217 625a9de0-492d-0410-920c-a7e632af1907

7 years agoMark a large number of functions not used outside of the file as static.
Diego Biurrun [Fri, 6 Aug 2010 23:17:36 +0000 (23:17 +0000)]
Mark a large number of functions not used outside of the file as static.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1216 625a9de0-492d-0410-920c-a7e632af1907

7 years agoProvide BUP file support for more issues.
Erik Hovland [Sat, 31 Jul 2010 00:21:01 +0000 (00:21 +0000)]
Provide BUP file support for more issues.

The BUP file is only opened when the IFO file open fails. We have a
few times where file corruption could happen and we could use the
BUP instead. This patch attempts to address this by trying to
open the BUP if there is any reported error w/ the IFO. Inspiration
for this patch came from Rich E, thanks for the detailed bug
report and attempts at using earlier patches.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1215 625a9de0-492d-0410-920c-a7e632af1907

7 years agoRemove the special case test for uid=0
Erik Hovland [Sat, 31 Jul 2010 00:10:33 +0000 (00:10 +0000)]
Remove the special case test for uid=0

Some package tools run configure as fakeroot.  This triggers code in
configure.ac 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1214 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix a spelling error in ifo_read.c
Erik Hovland [Sat, 31 Jul 2010 00:10:31 +0000 (00:10 +0000)]
Fix a spelling error in ifo_read.c

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1213 625a9de0-492d-0410-920c-a7e632af1907

7 years agoFix the test of whether disk names should be raw devices
Erik Hovland [Sat, 31 Jul 2010 00:10:28 +0000 (00:10 +0000)]
Fix the test of whether disk names should be raw devices

This is a side port of a fix from the original libdvdread 0.9.7 release.
Darwin and BSD platforms disk device names might have to be converted
to raw device names. There is a check for this in the code. But it is
missing a very important 'r'. This fix made it into the 0.9.7 release
but did not make the commit to this repo when this repo was given the
API changes for 0.9.7 because it was not clear whether the fix was
still relevant. Thanks to John Stebbins we now have this confirmation
and we can go ahead and commit this fix.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1212 625a9de0-492d-0410-920c-a7e632af1907

7 years agoin DVDOPen() use isalpha() rather than checking the first char of the device against...
Nico Sabbi [Tue, 20 Jul 2010 09:30:13 +0000 (09:30 +0000)]
in DVDOPen() use isalpha() rather than checking the first char of the device against 'A'..'Z'

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1204 625a9de0-492d-0410-920c-a7e632af1907

7 years agoin OS2 and WIN32 when CSS is not available print the correct message using path rathe...
Nico Sabbi [Tue, 20 Jul 2010 08:09:41 +0000 (08:09 +0000)]
in OS2 and WIN32 when CSS is not available print the correct message using path rather than dev_name; patch by komh chollium net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1203 625a9de0-492d-0410-920c-a7e632af1907

7 years agoas for win32 check for \video_ts as /video_ts in OS/2; patch by komh chollian net
Nico Sabbi [Tue, 20 Jul 2010 08:01:19 +0000 (08:01 +0000)]
as for win32 check for \video_ts as /video_ts in OS/2; patch by komh chollian net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1202 625a9de0-492d-0410-920c-a7e632af1907

7 years agoAs for win32 strip off the trailing \ if it is not a drive
Nico Sabbi [Tue, 20 Jul 2010 07:55:32 +0000 (07:55 +0000)]
As for win32 strip off the trailing \ if it is not a drive
on OS/2. Patch by Komh chollian net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1201 625a9de0-492d-0410-920c-a7e632af1907

7 years agoin OS/2 Use DVDOpenImageFile() only if it is a drive; patch by komh chollian net
Nico Sabbi [Tue, 20 Jul 2010 07:51:43 +0000 (07:51 +0000)]
in OS/2 Use  DVDOpenImageFile() only if it is a drive; patch by komh chollian net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1200 625a9de0-492d-0410-920c-a7e632af1907

7 years agoWin32: large file support under Mingw to go over 2G limits
Jean-Baptiste Kempf [Tue, 1 Jun 2010 17:07:13 +0000 (17:07 +0000)]
Win32: large file support under Mingw to go over 2G limits

Patch by John Stebbins of Handbrake

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1199 625a9de0-492d-0410-920c-a7e632af1907

7 years ago in _WIN32 do a sanity check against \video_ts in addition to /video_ts, because...
Nico Sabbi [Tue, 1 Jun 2010 07:27:56 +0000 (07:27 +0000)]
 in _WIN32 do a sanity check against \video_ts in addition to /video_ts, because both paths are admitted; patch by John Stebbins from Handbrake

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1195 625a9de0-492d-0410-920c-a7e632af1907

7 years agofixed buffer size dimension in UDFGetPVD(); patch A00 by John Stebbins
Nico Sabbi [Fri, 28 May 2010 13:24:16 +0000 (13:24 +0000)]
fixed buffer size dimension in UDFGetPVD(); patch A00 by John Stebbins

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1194 625a9de0-492d-0410-920c-a7e632af1907

7 years agoDetect arch endianness. src/bswap.h depends on WORD_BIGENDIAN being
Dominik Mierzejewski [Fri, 5 Mar 2010 21:16:01 +0000 (21:16 +0000)]
Detect arch endianness. src/bswap.h depends on WORD_BIGENDIAN being
defined on big-endian arch to select appropriate macros. configure2
did not produce that definition in config.h, so the code ended up
being incorrect on ppc and other big-endian arches.

Approved by Nico.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1191 625a9de0-492d-0410-920c-a7e632af1907

7 years agoadd bounds checking in UDFFileEntry
Jindrich Makovicka [Thu, 4 Mar 2010 19:14:17 +0000 (19:14 +0000)]
add bounds checking in UDFFileEntry

Some badly mastered DVDs can have set bogus lengths of the Allocation
Descriptors, causing a segfault. This check ensures that the total entry
length does not exceed DVD logical block size before processing the entry.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1190 625a9de0-492d-0410-920c-a7e632af1907

7 years ago100l, initialize file descriptor to -1, not 0.
Reimar Döffinger [Sat, 30 Jan 2010 15:15:23 +0000 (15:15 +0000)]
100l, initialize file descriptor to -1, not 0.
Fixes libdvdread closing stdin if it can't open the file/device.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1189 625a9de0-492d-0410-920c-a7e632af1907

7 years agoExpose the dvd_stat_t struct.
Erik Hovland [Mon, 7 Dec 2009 03:50:20 +0000 (03:50 +0000)]
Expose the dvd_stat_t struct.

The commits that brought in the DVDFileStat() function from libdvdread
0.9.7 incorrectly made the stat struct opaque. This can't be done because
the API does not use any allocation or deallocation code. So callers of
DVDFileStat cannot declare stat structs. Since we are attempting to
maintain the API compatibility w/ those releases of libdvdread, the
struct has been brought into the header. Thanks again to Rathann for
bringing this issue to the dvdnav list. And thanks to the original
bug reportera(O. Rolland) to fedora.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1188 625a9de0-492d-0410-920c-a7e632af1907

7 years agoUpdate ChangeLog for next release.
Dominik Mierzejewski [Sat, 14 Nov 2009 21:00:17 +0000 (21:00 +0000)]
Update ChangeLog for next release.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1186 625a9de0-492d-0410-920c-a7e632af1907

7 years agoRemove trailing whitespace.
Dominik Mierzejewski [Sat, 14 Nov 2009 20:59:38 +0000 (20:59 +0000)]
Remove trailing whitespace.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1185 625a9de0-492d-0410-920c-a7e632af1907

7 years agobump version due to DVDFileStat addition
Dominik Mierzejewski [Sat, 26 Sep 2009 22:23:58 +0000 (22:23 +0000)]
bump version due to DVDFileStat addition

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1183 625a9de0-492d-0410-920c-a7e632af1907

7 years agocosmetics: remove trailing whitespace
Dominik Mierzejewski [Sat, 26 Sep 2009 22:23:26 +0000 (22:23 +0000)]
cosmetics: remove trailing whitespace

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1182 625a9de0-492d-0410-920c-a7e632af1907

8 years agoAdd *BSD porting bits from 0.9.7
Erik Hovland [Wed, 2 Sep 2009 01:44:16 +0000 (01:44 +0000)]
Add *BSD porting bits from 0.9.7

Both version 0.9.6 and 0.9.7 had some porting code put in for the
*BSDs. This code is untested by me, but I bet the OpenSolaris
and *BSD folk would love to have it.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1179 625a9de0-492d-0410-920c-a7e632af1907

8 years agoAdd DVD file stat from version 0.9.7 to libdvdread
Erik Hovland [Wed, 2 Sep 2009 01:43:21 +0000 (01:43 +0000)]
Add DVD file stat from version 0.9.7 to libdvdread

A new function to do an informational read of the DVD file handle was
introduced to libdvdread 0.9.7 (or was it .6). Since libdvdread at
mplayerhq imported an older version of dvdread/dvdnav this part of
the API was not available. This commit places that function into
the library making this library complete in reference to 0.9.7.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1178 625a9de0-492d-0410-920c-a7e632af1907

8 years agoUse parens to make the 'is present' mask explicit
Erik Hovland [Wed, 2 Sep 2009 01:43:18 +0000 (01:43 +0000)]
Use parens to make the 'is present' mask explicit

W/o parens the check for the 'is present' mask will not work right
because the ! operator will evaluate first. But by wrapping the
& operation in parens, we make it explicit that this goes first.
And so the is present flag will be properly evaluated in the
conditional

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1177 625a9de0-492d-0410-920c-a7e632af1907

8 years agoRemove empty if clause.
Erik Hovland [Wed, 2 Sep 2009 01:34:23 +0000 (01:34 +0000)]
Remove empty if clause.

An if clause is empty. This makes the else do all of the work
and still ends up w/ a larger object file because the if clause
is stuck into the object file. By moving to the logical not of
the if we can remove the empty clause.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1176 625a9de0-492d-0410-920c-a7e632af1907

8 years agoreplaced conditional checks on MSC with _WIN32 to permit MINGW to mount and decrypt...
Nico Sabbi [Tue, 4 Aug 2009 21:21:49 +0000 (21:21 +0000)]
replaced conditional checks on MSC with _WIN32 to permit MINGW to mount and decrypt images; patch by John Stebbins (stebbing jetheaddev com)

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1175 625a9de0-492d-0410-920c-a7e632af1907

8 years agoin OS/2 the device must be opened in binary mode; patch by KO Myung-Hun - komh cholli...
Nico Sabbi [Mon, 8 Jun 2009 22:02:37 +0000 (22:02 +0000)]
in OS/2 the device must be opened in binary mode; patch by KO Myung-Hun - komh chollian net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1174 625a9de0-492d-0410-920c-a7e632af1907

8 years agoAdd #include for config.h. Several preprocessor definitions were used without
Diego Biurrun [Tue, 5 May 2009 17:27:14 +0000 (17:27 +0000)]
Add #include for config.h. Several preprocessor definitions were used without
config.h being present. This would break the build if the definitions were not
provided on the compiler command line.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1173 625a9de0-492d-0410-920c-a7e632af1907

8 years agoremoved unnecessary config.h; patch by Erik Hovland
Nico Sabbi [Tue, 28 Apr 2009 13:26:33 +0000 (13:26 +0000)]
removed unnecessary config.h; patch by Erik Hovland

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1172 625a9de0-492d-0410-920c-a7e632af1907

8 years agomodified DVDOpen() to use a unified DVDOpen_error label; patch by Erik Hovland
Nico Sabbi [Tue, 28 Apr 2009 13:19:51 +0000 (13:19 +0000)]
modified DVDOpen() to use a unified DVDOpen_error label; patch by Erik Hovland

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1171 625a9de0-492d-0410-920c-a7e632af1907

8 years agoUse __APPLE__ instead of __DARWIN__ in preprocessor check.
Diego Biurrun [Sat, 25 Apr 2009 15:50:42 +0000 (15:50 +0000)]
Use __APPLE__ instead of __DARWIN__ in preprocessor check.
__DARWIN__ is not defined (by default) on Mac OS X and
__APPLE__ is used in other places throughout the code.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1170 625a9de0-492d-0410-920c-a7e632af1907

8 years agospelling fixes by Erik Hovland
Nico Sabbi [Sun, 15 Feb 2009 18:30:24 +0000 (18:30 +0000)]
spelling fixes by Erik Hovland

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1168 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1165 625a9de0-492d-0410-920c-a7e632af1907

8 years agoFix path to dvd_reader.h
Reimar Döffinger [Wed, 7 Jan 2009 17:14:23 +0000 (17:14 +0000)]
Fix path to dvd_reader.h

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1163 625a9de0-492d-0410-920c-a7e632af1907

8 years agoMove installed headers into dvdread directory to make them easier to
Reimar Döffinger [Wed, 31 Dec 2008 08:43:03 +0000 (08:43 +0000)]
Move installed headers into dvdread directory to make them easier to
use in a consistent way without installing.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1162 625a9de0-492d-0410-920c-a7e632af1907

8 years agoRemove trailing whitespace to avoid issues with precommit hook
Reimar Döffinger [Wed, 31 Dec 2008 08:41:23 +0000 (08:41 +0000)]
Remove trailing whitespace to avoid issues with precommit hook

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1161 625a9de0-492d-0410-920c-a7e632af1907

8 years agoBecause of ARM memory alignment issues the struct app_info has to be
Dominik Mierzejewski [Sat, 13 Dec 2008 14:27:51 +0000 (14:27 +0000)]
Because of ARM memory alignment issues the struct app_info has to be
packed.

Patch by Erik Hovland /erik ^ hovland * org \

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1159 625a9de0-492d-0410-920c-a7e632af1907

8 years agocosmetics: sane indentation for case statements
Diego Biurrun [Sun, 26 Oct 2008 22:16:30 +0000 (22:16 +0000)]
cosmetics: sane indentation for case statements
taken from a patch by Jorgen Lundman, lundman lundman net

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1158 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1154 625a9de0-492d-0410-920c-a7e632af1907

8 years agoRemove remaining tabs and trailing whitespace.
Diego Biurrun [Sun, 28 Sep 2008 15:56:44 +0000 (15:56 +0000)]
Remove remaining tabs and trailing whitespace.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1153 625a9de0-492d-0410-920c-a7e632af1907

8 years agocosmetics: function renaming from libdvdread 0.9.5
Diego Biurrun [Thu, 25 Sep 2008 22:09:59 +0000 (22:09 +0000)]
cosmetics: function renaming from libdvdread 0.9.5

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1152 625a9de0-492d-0410-920c-a7e632af1907

8 years agocosmetics: one more hunk of indentation sync
Diego Biurrun [Thu, 25 Sep 2008 22:08:45 +0000 (22:08 +0000)]
cosmetics: one more hunk of indentation sync

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1151 625a9de0-492d-0410-920c-a7e632af1907

8 years agocosmetics: Sync indentation and similar changes from libdvdread 0.9.5.
Diego Biurrun [Thu, 25 Sep 2008 09:17:42 +0000 (09:17 +0000)]
cosmetics: Sync indentation and similar changes from libdvdread 0.9.5.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1150 625a9de0-492d-0410-920c-a7e632af1907

8 years agocosmetics: Convert all tabs to spaces.
Diego Biurrun [Tue, 23 Sep 2008 09:14:45 +0000 (09:14 +0000)]
cosmetics: Convert all tabs to spaces.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1149 625a9de0-492d-0410-920c-a7e632af1907

9 years agoIgnore all generated files.
Diego Biurrun [Sun, 14 Sep 2008 21:47:08 +0000 (21:47 +0000)]
Ignore all generated files.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1148 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1146 625a9de0-492d-0410-920c-a7e632af1907

9 years agoAdd missing license header.
Diego Biurrun [Sun, 14 Sep 2008 20:53:47 +0000 (20:53 +0000)]
Add missing license header.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1145 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1144 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1143 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1139 625a9de0-492d-0410-920c-a7e632af1907

9 years agoUse consistent license headers everywhere: Fix FSF address and boilerplate.
Diego Biurrun [Sun, 14 Sep 2008 15:42:49 +0000 (15:42 +0000)]
Use consistent license headers everywhere: Fix FSF address and boilerplate.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1138 625a9de0-492d-0410-920c-a7e632af1907

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

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1136 625a9de0-492d-0410-920c-a7e632af1907

9 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1135 625a9de0-492d-0410-920c-a7e632af1907

9 years agoCosmetics: remove empty lines.
Dominik Mierzejewski [Mon, 1 Sep 2008 21:05:17 +0000 (21:05 +0000)]
Cosmetics: remove empty lines.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1134 625a9de0-492d-0410-920c-a7e632af1907

9 years agoComments cleanup: fix spelling and grammar errors.
Dominik Mierzejewski [Mon, 1 Sep 2008 21:04:33 +0000 (21:04 +0000)]
Comments cleanup: fix spelling and grammar errors.

Patch by: Erik Hovland !erik#hovland at org*

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1133 625a9de0-492d-0410-920c-a7e632af1907

9 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://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1131 625a9de0-492d-0410-920c-a7e632af1907

9 years agoGenerate pkgconfig files by default.
Dominik Mierzejewski [Sun, 31 Aug 2008 00:41:21 +0000 (00:41 +0000)]
Generate pkgconfig files by default.

git-svn-id: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread@1130 625a9de0-492d-0410-920c-a7e632af1907