summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Danya Dietrich <kito@gentoo.org>2004-11-13 07:07:03 +0000
committerKito Danya Dietrich <kito@gentoo.org>2004-11-13 07:07:03 +0000
commitdd06ef1ceb60f0a056cb7c09279982424fc1a2e3 (patch)
tree1d5efedf89b34d80c4ac27d4a7dfd1d8126e3fbd /media-sound/mpg321/files
parentsh KEYWORDS (Manifest recommit) (diff)
downloadgentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.tar.gz
gentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.tar.bz2
gentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.zip
added patch from FreeBSD ports. Fixes mem leaks and minor display bugs. ~ppc-macos
Diffstat (limited to 'media-sound/mpg321/files')
-rw-r--r--media-sound/mpg321/files/digest-mpg321-0.2.10-r21
-rw-r--r--media-sound/mpg321/files/mpg321-0.2.10.diff73
2 files changed, 74 insertions, 0 deletions
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);
+ }