# HG changeset patch # User diego # Date 1187337433 0 # Node ID b69c47dca975950042ebdadb7c9679f0d3832d58 # Parent 7977493e93e542bf5537f5b659650e2c4680de72 Sync libdvdread with version 0.9.7. diff -r 7977493e93e5 -r b69c47dca975 Changelog --- a/Changelog Thu Aug 16 21:55:17 2007 +0000 +++ b/Changelog Fri Aug 17 07:57:13 2007 +0000 @@ -115,7 +115,7 @@ * 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 -r 7977493e93e5 -r b69c47dca975 Copyright --- a/Copyright Thu Aug 16 21:55:17 2007 +0000 +++ b/Copyright Fri Aug 17 07:57:13 2007 +0000 @@ -49,7 +49,7 @@ 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 diff -r 7977493e93e5 -r b69c47dca975 dvdread/bswap.h --- a/dvdread/bswap.h Thu Aug 16 21:55:17 2007 +0000 +++ b/dvdread/bswap.h Fri Aug 17 07:57:13 2007 +0000 @@ -80,6 +80,13 @@ #define B2N_32(x) x = be32toh(x) #define B2N_64(x) x = be64toh(x) + +#elif defined(__APPLE__) || defined(__DARWIN__) +#include +#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 @@ } #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 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 @@ (((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 -r 7977493e93e5 -r b69c47dca975 dvdread/dvd_reader.c --- a/dvdread/dvd_reader.c Thu Aug 16 21:55:17 2007 +0000 +++ b/dvdread/dvd_reader.c Fri Aug 17 07:57:13 2007 +0000 @@ -679,7 +679,7 @@ fprintf(stderr, "libdvdread: DVDClose(): Memory leak in align functions\n"); } } - dvdinput_free(); + free( dvd ); } } diff -r 7977493e93e5 -r b69c47dca975 dvdread/dvd_reader.h --- a/dvdread/dvd_reader.h Thu Aug 16 21:55:17 2007 +0000 +++ b/dvdread/dvd_reader.h Fri Aug 17 07:57:13 2007 +0000 @@ -34,7 +34,7 @@ /** * The current version. (0.9.4 => 904, 1.2.3 => 10203) */ -#define DVDREAD_VERSION 906 +#define DVDREAD_VERSION 907 /**