openbsd-ports/audio/faad/patches/patch-plugins_xmms_src_libmp4_c
jakemsr ad8a707fdf problem:
libfaad uses data types with machine dependent bit width in
prototypes in its public headers, but in the corresponding library
code, machine independent exact width data types are used.

solution:
change libfaad headers to use the same machine independent exact
width data types in the prototypes as in the library.  since the
prototypes in the library headers are changed, users of libfaad
likely need to be modified to use exact width data types as well.

also:
- bump libfaad major version number
- update plugin code to use exact width data types for libfaad
  interaction, as per new prototypes
- bump package version
- sync patches with update-patches


problem discovered by, solution discussed with, reviewed, tested
and OK naddy@
2007-06-29 06:01:42 +00:00

49 lines
1.6 KiB
Plaintext

$OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.1 2007/06/29 06:01:42 jakemsr Exp $
--- plugins/xmms/src/libmp4.c.orig Wed Dec 3 10:37:56 2003
+++ plugins/xmms/src/libmp4.c Thu May 31 14:42:02 2007
@@ -22,6 +22,9 @@
#define MP4_ABOUT "Written by ciberfred"
#define BUFFER_SIZE FAAD_MIN_STREAMSIZE*64
+extern void getMP4info(char* file);
+extern int getAACTrack(MP4FileHandle file);
+
static void mp4_init(void);
static void mp4_about(void);
static void mp4_play(char *);
@@ -113,9 +116,9 @@ static int mp4_isFile(char *filename)
extention = strrchr(filename, '.');
if (extention &&
- !strcasecmp(extention, ".mp4") || // official extention
- !strcasecmp(extention, ".m4a") || // Apple mp4 extention
- !strcasecmp(extention, ".aac") // old MPEG2/4-AAC extention
+ (!strcasecmp(extention, ".mp4") || // official extention
+ !strcasecmp(extention, ".m4a") || // Apple mp4 extention
+ !strcasecmp(extention, ".aac")) // old MPEG2/4-AAC extention
){
return (1);
}
@@ -202,8 +205,8 @@ static void *mp4Decode(void *args)
faacDecHandle decoder;
unsigned char *buffer = NULL;
guint bufferSize = 0;
- gulong samplerate;
- guchar channels;
+ guint32 samplerate;
+ guint8 channels;
guint avgBitrate;
MP4Duration duration;
gulong msDuration;
@@ -330,8 +333,8 @@ static void *mp4Decode(void *args)
faacDecHandle decoder = 0;
guchar *buffer = 0;
gulong bufferconsumed = 0;
- gulong samplerate = 0;
- guchar channels;
+ guint32 samplerate = 0;
+ guint8 channels;
gulong buffervalid = 0;
TitleInput* input;
gchar *temp = g_strdup(args);