[audacious] Merge fix for upstream bug 332: Increase maximum file-probing buffer

Michael Schwendt mschwendt at fedoraproject.org
Sat Aug 31 06:45:26 UTC 2013


commit ec91cda3d5d3e16b259c4af96841ace71ceb13e1
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Sat Aug 31 08:45:09 2013 +0200

    Merge fix for upstream bug 332: Increase maximum file-probing buffer
    
      to 256 KB to handle Vorbis files that put high-res album art before
      the audio stream.

 audacious-3.4-increase-probe-buffer.patch |   53 +++++++++++++++++++++++++++++
 audacious.spec                            |   11 +++++-
 2 files changed, 63 insertions(+), 1 deletions(-)
---
diff --git a/audacious-3.4-increase-probe-buffer.patch b/audacious-3.4-increase-probe-buffer.patch
new file mode 100644
index 0000000..e1202a7
--- /dev/null
+++ b/audacious-3.4-increase-probe-buffer.patch
@@ -0,0 +1,53 @@
+diff -Nur audacious-3.4-orig/src/audacious/probe-buffer.c audacious-3.4/src/audacious/probe-buffer.c
+--- audacious-3.4-orig/src/audacious/probe-buffer.c	2013-06-29 04:04:28.000000000 +0200
++++ audacious-3.4/src/audacious/probe-buffer.c	2013-08-31 08:33:13.372756883 +0200
+@@ -17,17 +17,18 @@
+  * the use of this software.
+  */
+ 
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+ #include "debug.h"
+ #include "probe-buffer.h"
+ 
++#define BUFSIZE (256 * 1024)
++
+ typedef struct
+ {
+     VFSFile * file;
+-    unsigned char buffer[16384];
++    unsigned char buffer[BUFSIZE];
+     int filled, at;
+ }
+ ProbeBuffer;
+@@ -37,7 +38,7 @@
+     ProbeBuffer * p = vfs_get_handle (file);
+ 
+     int ret = vfs_fclose (p->file);
+-    g_slice_free (ProbeBuffer, p);
++    free (p);
+     return ret;
+ }
+ 
+@@ -88,7 +89,9 @@
+     if (whence == SEEK_CUR)
+         offset += p->at;
+ 
+-    g_return_val_if_fail (offset >= 0, -1);
++    if (offset < 0)
++        return -1;
++
+     increase_buffer (p, offset);
+ 
+     if (offset > p->filled)
+@@ -167,7 +170,7 @@
+     if (! file)
+         return NULL;
+ 
+-    ProbeBuffer * p = g_slice_new (ProbeBuffer);
++    ProbeBuffer * p = malloc (sizeof (ProbeBuffer));
+     p->file = file;
+     p->filled = 0;
+     p->at = 0;
diff --git a/audacious.spec b/audacious.spec
index 12ca664..c89bff6 100644
--- a/audacious.spec
+++ b/audacious.spec
@@ -8,7 +8,7 @@
 
 Name: audacious
 Version: 3.4
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 License: BSD
 Summary: Advanced audio player
@@ -17,6 +17,9 @@ Group: Applications/Multimedia
 
 Source0: http://distfiles.audacious-media-player.org/audacious-%{tar_ver}.tar.bz2
 
+# fixed post-3.4
+Patch0: audacious-3.4-increase-probe-buffer.patch
+
 BuildRequires: gettext
 BuildRequires: gtk3-devel
 BuildRequires: libguess-devel
@@ -97,6 +100,7 @@ generated documentation for developers.
 
 %prep
 %setup -q -n %{name}-%{tar_ver}
+%patch0 -p1 -b .increase-probe-buffer
 
 # Verify the value of the audacious(plugin-api) Provides.
 api=$(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\+' src/audacious/plugin.h | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\([0-9]\+\).*!\1!')
@@ -172,6 +176,11 @@ fi
 %doc doc/html/
 
 %changelog
+* Sat Aug 31 2013 Michael Schwendt <mschwendt at fedoraproject.org> - 3.4-4
+- Merge fix for upstream bug 332: Increase maximum file-probing buffer
+  to 256 KB to handle Vorbis files that put high-res album art before
+  the audio stream.
+
 * Mon Aug 26 2013 Michael Schwendt <mschwendt at fedoraproject.org> - 3.4-3
 - Add absolute paths to commands in scriptlets.
 - Move developer HTML documentation into new noarch audacious-doc


More information about the scm-commits mailing list