Fix build with gcc-2.95, bump pkgname

OKs from landry@, jasper@, sthen@
This commit is contained in:
sebastia 2010-06-14 17:44:46 +00:00
parent 324baf861f
commit 21c3c1e777
3 changed files with 76 additions and 9 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.40 2010/04/08 07:17:21 jasper Exp $
# $OpenBSD: Makefile,v 1.41 2010/06/14 17:44:46 sebastia Exp $
COMMENT-main= MPEG-2 and MPEG-4 AAC decoder
COMMENT-xmms= XMMS input plugin for AAC files
V= 2.6.1
DISTNAME= faad2-${V}
PKGNAME-main= faad-${V}p0
PKGNAME-xmms= faad-xmms-${V}p0
PKGNAME-main= faad-${V}p1
PKGNAME-xmms= faad-xmms-${V}p1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=faac/}
SHARED_LIBS += faad 2.0 # .0.0

View File

@ -1,7 +1,29 @@
$OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.2 2008/09/15 21:58:19 jakemsr Exp $
--- plugins/xmms/src/libmp4.c.orig Tue Jun 5 12:00:18 2007
+++ plugins/xmms/src/libmp4.c Wed Jul 16 00:12:57 2008
@@ -290,7 +290,7 @@ static void *mp4Decode(void *args)
$OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.3 2010/06/14 17:44:46 sebastia Exp $
Some reordering of variable initialization fixes build with gcc-2.95
--- plugins/xmms/src/libmp4.c.orig Tue Jun 5 21:00:18 2007
+++ plugins/xmms/src/libmp4.c Mon Jun 14 18:30:32 2010
@@ -207,15 +207,17 @@ static void mp4_getSongTitle(char *filename, char **ti
mp4ff_callback_t* mp4cb;
mp4ff_t* infile;
gint mp4track;
+ double track_duration;
+ unsigned long time_scale, length;
mp4cb = getMP4FF_cb(mp4file);
if ((infile = mp4ff_open_read_metaonly(mp4cb)) &&
((mp4track = getAACTrack(infile)) >= 0)){
(*title) = getMP4title(infile, filename);
- double track_duration = mp4ff_get_track_duration(infile, mp4track);
- unsigned long time_scale = mp4ff_time_scale(infile, mp4track);
- unsigned long length = (track_duration * 1000 / time_scale);
+ track_duration = mp4ff_get_track_duration(infile, mp4track);
+ time_scale = mp4ff_time_scale(infile, mp4track);
+ length = (track_duration * 1000 / time_scale);
(*len) = length;
}
if(infile) mp4ff_close(infile);
@@ -290,7 +292,7 @@ static void *mp4Decode(void *args)
NeAACDecHandle decoder;
unsigned char *buffer = NULL;
guint bufferSize = 0;
@ -10,7 +32,7 @@ $OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.2 2008/09/15 21:58:19 jakemsr Exp
guchar channels;
//guint avgBitrate;
//MP4Duration duration;
@@ -339,7 +339,7 @@ static void *mp4Decode(void *args)
@@ -339,7 +341,7 @@ static void *mp4Decode(void *args)
mp4_ip.output->open_audio(FMT_S16_NE, samplerate, channels);
mp4_ip.output->flush(0);
mp4_ip.set_info(xmmstitle, msDuration, -1, samplerate/1000, channels);
@ -19,7 +41,7 @@ $OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.2 2008/09/15 21:58:19 jakemsr Exp
while(bPlaying){
void* sampleBuffer;
@@ -414,8 +414,8 @@ end:
@@ -414,8 +416,8 @@ end:
FILE *file = NULL;
NeAACDecHandle decoder = 0;
guchar *buffer = 0;

View File

@ -0,0 +1,45 @@
$OpenBSD: patch-plugins_xmms_src_mp4_utils_c,v 1.1 2010/06/14 17:44:46 sebastia Exp $
reorder variables, fixing build with gcc-2.95
--- plugins/xmms/src/mp4_utils.c.orig Sun Oct 17 22:44:51 2004
+++ plugins/xmms/src/mp4_utils.c Mon Jun 14 18:31:29 2010
@@ -103,6 +103,10 @@ void create_mp4_info_dialog (char *filename, FILE *mp4
static GtkWidget *genre_entry, *year_entry, *track_entry, *comment_entry;
static GtkWidget *mp4_info_label;
+ double track_duration;
+ int min, sec, filesize;
+ unsigned long bitrate, samplerate, channels, audio_type, time_scale, length;
+
if (!mp4_info_dialog)
{
GtkWidget *dialog_vbox1, *vbox1, *hbox2, *hbox3, *hbox4;
@@ -377,19 +381,19 @@ void create_mp4_info_dialog (char *filename, FILE *mp4
}
// Get the length of the track.
- double track_duration = mp4ff_get_track_duration(infile, mp4track);
- unsigned long time_scale = mp4ff_time_scale(infile, mp4track);
- unsigned long length = (track_duration / time_scale);
- int min = length / 60;
- int sec = length % 60;
+ track_duration = mp4ff_get_track_duration(infile, mp4track);
+ time_scale = mp4ff_time_scale(infile, mp4track);
+ length = (track_duration / time_scale);
+ min = length / 60;
+ sec = length % 60;
// Get other info about the track.
- unsigned long bitrate = mp4ff_get_avg_bitrate(infile, mp4track) / 1000;
- unsigned long samplerate = mp4ff_get_sample_rate(infile, mp4track);
- unsigned long channels = mp4ff_get_channel_count(infile, mp4track);
- unsigned long audio_type = mp4ff_get_audio_type(infile, mp4track);
+ bitrate = mp4ff_get_avg_bitrate(infile, mp4track) / 1000;
+ samplerate = mp4ff_get_sample_rate(infile, mp4track);
+ channels = mp4ff_get_channel_count(infile, mp4track);
+ audio_type = mp4ff_get_audio_type(infile, mp4track);
fseek(mp4file, 0, SEEK_END);
- int filesize = ftell(mp4file) / 1024;
+ filesize = ftell(mp4file) / 1024;
value = g_strdup_printf("Length: %d:%d\nAvg. Bitrate: %ld kbps\nSample Rate: %ld Hz\nChannels: %ld\nAudio Type: %ld\nFile Size: %d KB", min, sec, bitrate, samplerate, channels, audio_type, filesize);
gtk_label_set_text (GTK_LABEL(mp4_info_label), value);