summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-17 07:57:13 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-17 07:57:13 +0000
commit9c634704726c219cc7a719ff5532261e338c402e (patch)
tree01e5e3fd993777ade6193bc53a81a2fa344271d7
parente50520a6d1e03462407edc37df0cc8d6591602ee (diff)
downloadmpv-9c634704726c219cc7a719ff5532261e338c402e.tar.bz2
mpv-9c634704726c219cc7a719ff5532261e338c402e.tar.xz
Sync libdvdread with version 0.9.7.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24085 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Changelog2
-rw-r--r--Copyright2
-rw-r--r--dvdread/bswap.h23
-rw-r--r--dvdread/dvd_reader.c2
-rw-r--r--dvdread/dvd_reader.h2
5 files changed, 21 insertions, 10 deletions
diff --git a/Changelog b/Changelog
index 9e4183f723..56030bd542 100644
--- a/Changelog
+++ b/Changelog
@@ -115,7 +115,7 @@ MPlayer (1.0)
* ability to change subtitle size during playback
* ability to turn loop on/off during playback
* Apple Remote support
- * libdvdread updated to 0.9.6
+ * libdvdread updated to 0.9.7
rc1: "Codename intentionally left blank" October 22, 2006
diff --git a/Copyright b/Copyright
index 4f1c46e086..d70f7dbd95 100644
--- a/Copyright
+++ b/Copyright
@@ -49,7 +49,7 @@ Copyright: 1998-2006 VideoLAN
License: GNU General Public License
Name: libdvdread
-Version: 0.9.6 + patches
+Version: 0.9.7 + patches
Homepage: http://www.dtek.chalmers.se/groups/dvd/development.shtml
Directory: dvdread
Copyright: 1998, 1999 Eric Smith <eric@brouhaha.com>
diff --git a/dvdread/bswap.h b/dvdread/bswap.h
index 7abd167a43..6e9d5a151e 100644
--- a/dvdread/bswap.h
+++ b/dvdread/bswap.h
@@ -80,6 +80,13 @@
#define B2N_32(x) x = be32toh(x)
#define B2N_64(x) x = be64toh(x)
+
+#elif defined(__APPLE__) || defined(__DARWIN__)
+#include <libkern/OSByteOrder.h>
+#define B2N_16(x) x = OSSwapBigToHostConstInt16(x)
+#define B2N_32(x) x = OSSwapBigToHostConstInt32(x)
+#define B2N_64(x) x = OSSwapBigToHostConstInt64(x)
+
#elif defined(ARCH_X86)
inline static unsigned short bswap_16(unsigned short x)
{
@@ -118,13 +125,22 @@ inline static unsigned long long int bswap_64(unsigned long long int x)
}
#define B2N_64(x) x = bswap_64(x)
+#else
+#if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX) || defined(__CYGWIN__)
+/* These systems don't have swap macros */
+#else
+/* If there isn't a header provided with your system with this functionality
+ * add the relevant || define( ) to the list above.
+ */
+#warning "You should add endian swap macros for your system"
+#endif
+
/* This is a slow but portable implementation, it has multiple evaluation
* problems so beware.
* Old FreeBSD's and Solaris don't have <byteswap.h> or any other such
* functionality!
*/
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX) || defined(__CYGWIN__)
#define B2N_16(x) \
x = ((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8))
@@ -143,12 +159,7 @@ inline static unsigned long long int bswap_64(unsigned long long int x)
(((x) & 0x000000000000ff00) << 40) | \
(((x) & 0x00000000000000ff) << 56))
-#else
-/* If there isn't a header provided with your system with this functionality
- * add the relevant || define( ) to the portable implementation above.
- */
-#error "You need to add endian swap macros for you're system"
#endif
diff --git a/dvdread/dvd_reader.c b/dvdread/dvd_reader.c
index 72a7219ac9..0914bc6391 100644
--- a/dvdread/dvd_reader.c
+++ b/dvdread/dvd_reader.c
@@ -679,7 +679,7 @@ void DVDClose( dvd_reader_t *dvd )
fprintf(stderr, "libdvdread: DVDClose(): Memory leak in align functions\n");
}
}
- dvdinput_free();
+
free( dvd );
}
}
diff --git a/dvdread/dvd_reader.h b/dvdread/dvd_reader.h
index fbd3b3217b..17ab52a694 100644
--- a/dvdread/dvd_reader.h
+++ b/dvdread/dvd_reader.h
@@ -34,7 +34,7 @@
/**
* The current version. (0.9.4 => 904, 1.2.3 => 10203)
*/
-#define DVDREAD_VERSION 906
+#define DVDREAD_VERSION 907
/**