From dd06ef1ceb60f0a056cb7c09279982424fc1a2e3 Mon Sep 17 00:00:00 2001 From: Kito Danya Dietrich Date: Sat, 13 Nov 2004 07:07:03 +0000 Subject: added patch from FreeBSD ports. Fixes mem leaks and minor display bugs. ~ppc-macos --- media-sound/mpg321/files/digest-mpg321-0.2.10-r2 | 1 + media-sound/mpg321/files/mpg321-0.2.10.diff | 73 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 media-sound/mpg321/files/digest-mpg321-0.2.10-r2 create mode 100644 media-sound/mpg321/files/mpg321-0.2.10.diff (limited to 'media-sound/mpg321/files') diff --git a/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 b/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 new file mode 100644 index 000000000000..7332a87bdc5f --- /dev/null +++ b/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 @@ -0,0 +1 @@ +MD5 bb403b35c2d25655d55f0f616b8f47bb mpg321-0.2.10.tar.gz 113449 diff --git a/media-sound/mpg321/files/mpg321-0.2.10.diff b/media-sound/mpg321/files/mpg321-0.2.10.diff new file mode 100644 index 000000000000..dace5b33dde9 --- /dev/null +++ b/media-sound/mpg321/files/mpg321-0.2.10.diff @@ -0,0 +1,73 @@ +diff -uNr mpg321-0.2.10/mpg321.c mpg321-0.2.10-new/mpg321.c +--- mpg321-0.2.10/mpg321.c Sat Mar 23 23:49:20 2002 ++++ mpg321-0.2.10-new/mpg321.c Sat Nov 13 00:50:25 2004 +@@ -188,7 +188,7 @@ + + else + { +- printf(names[i]); ++ printf("%s", names[i]); + free(names[i]); + } + } +@@ -203,7 +203,7 @@ + if (!names[i]) { + fprintf (stderr, emptystring); + } else { +- fprintf (stderr, names[i]); ++ fprintf (stderr, "%s", names[i]); + free (names[i]); + } + if (i%2) fprintf (stderr, "\n"); +@@ -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); + +- if (quit_now) +- break; +- + if (playbuf.frames) + free(playbuf.frames); + +@@ -521,6 +521,7 @@ + if (playbuf.fd == -1) + { + munmap(playbuf.buf, playbuf.length); ++ close(fd); + } + + else +@@ -535,10 +536,6 @@ + ao_close(playdevice); + + ao_shutdown(); +- +-#if defined(RAW_SUPPORT) || defined(HTTP_SUPPORT) || defined(FTP_SUPPORT) +- if(fd) close(fd); +-#endif + + return(0); + } -- cgit v1.2.3-65-gdbad