diff options
author | naddy <naddy@FreeBSD.org> | 2004-01-08 04:24:23 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2004-01-08 04:24:23 +0800 |
commit | c23266a21cf6ef3083bf4ff4a246fb0e6dc8cb26 (patch) | |
tree | 69c74b35fc9e6153e9d06a3312348385ae9ff179 /audio | |
parent | 47fdcddebf8b7225a5dc9e631d5d8dc8ef670a35 (diff) | |
download | freebsd-ports-gnome-c23266a21cf6ef3083bf4ff4a246fb0e6dc8cb26.tar.gz freebsd-ports-gnome-c23266a21cf6ef3083bf4ff4a246fb0e6dc8cb26.tar.zst freebsd-ports-gnome-c23266a21cf6ef3083bf4ff4a246fb0e6dc8cb26.zip |
* Fix libmad and libid3tag dependencies.
Submitted by: sheldonh
* Don't leak file descriptors on error.
Obtained from: Debian
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mpg321/Makefile | 5 | ||||
-rw-r--r-- | audio/mpg321/files/patch-mpg321.c | 31 |
2 files changed, 30 insertions, 6 deletions
diff --git a/audio/mpg321/Makefile b/audio/mpg321/Makefile index 15cb1028f465..9dc930eccbec 100644 --- a/audio/mpg321/Makefile +++ b/audio/mpg321/Makefile @@ -7,7 +7,7 @@ PORTNAME= mpg321 PORTVERSION= 0.2.10 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mpg321 @@ -16,7 +16,8 @@ MAINTAINER= naddy@FreeBSD.org COMMENT= A free command-line mp3 player, compatible with mpg123 LIB_DEPENDS= ao.3:${PORTSDIR}/audio/libao \ - mad.2:${PORTSDIR}/audio/mad + id3tag.2:${PORTSDIR}/audio/libid3tag \ + mad.2:${PORTSDIR}/audio/libmad GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-mpg123-symlink diff --git a/audio/mpg321/files/patch-mpg321.c b/audio/mpg321/files/patch-mpg321.c index ec792ebd7091..344e69a6908a 100644 --- a/audio/mpg321/files/patch-mpg321.c +++ b/audio/mpg321/files/patch-mpg321.c @@ -2,7 +2,7 @@ $FreeBSD$ --- mpg321.c.orig Sun Mar 24 06:49:20 2002 -+++ mpg321.c Tue Sep 3 01:29:40 2002 ++++ mpg321.c Wed Jan 7 21:12:40 2004 @@ -188,7 +188,7 @@ else @@ -21,7 +21,30 @@ $FreeBSD$ free (names[i]); } if (i%2) fprintf (stderr, "\n"); -@@ -509,9 +509,6 @@ +@@ -410,12 +410,14 @@ + + if(fstat(fd, &stat) == -1) + { ++ close(fd); + mpg321_error(currentfile); + continue; + } + + if (!S_ISREG(stat.st_mode)) + { ++ close(fd); + continue; + } + +@@ -432,6 +434,7 @@ + if((playbuf.buf = mmap(0, playbuf.length, PROT_READ, MAP_SHARED, fd, 0)) + == MAP_FAILED) + { ++ close(fd); + mpg321_error(currentfile); + continue; + } +@@ -509,9 +512,6 @@ mad_decoder_finish(&decoder); @@ -31,7 +54,7 @@ $FreeBSD$ if (playbuf.frames) free(playbuf.frames); -@@ -521,6 +518,7 @@ +@@ -521,6 +521,7 @@ if (playbuf.fd == -1) { munmap(playbuf.buf, playbuf.length); @@ -39,7 +62,7 @@ $FreeBSD$ } else -@@ -535,10 +533,6 @@ +@@ -535,10 +536,6 @@ ao_close(playdevice); ao_shutdown(); |