[libfishsound] 02/02: Fix incompatible flac callback types.

Martin Steghöfer martin.steghoefer-guest at moszumanska.debian.org
Wed Oct 22 20:22:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

martin.steghoefer-guest pushed a commit to branch master
in repository libfishsound.

commit 5271b1fbfd912d194c250ef3c9d54e98b7ea82e2
Author: Martin Steghöfer <martin at steghoefer.eu>
Date:   Wed Oct 22 22:04:31 2014 +0200

    Fix incompatible flac callback types.
---
 ...0003-Fix-incompatible-flac-callback-types.patch | 65 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 66 insertions(+)

diff --git a/debian/patches/0003-Fix-incompatible-flac-callback-types.patch b/debian/patches/0003-Fix-incompatible-flac-callback-types.patch
new file mode 100644
index 0000000..22160ff
--- /dev/null
+++ b/debian/patches/0003-Fix-incompatible-flac-callback-types.patch
@@ -0,0 +1,65 @@
+From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin at steghoefer.eu>
+Date: Wed, 22 Oct 2014 22:03:15 +0200
+Subject: Fix incompatible flac callback types.
+
+Bug-Debian: https://bugs.debian.org/766394
+
+Starting from libflac 1.1.3 the flac API uses "size_t" as parameter type for the number of bytes in all callback functions.
+---
+ src/libfishsound/flac.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/src/libfishsound/flac.c b/src/libfishsound/flac.c
+index 930c77b..0fc59ad 100644
+--- a/src/libfishsound/flac.c
++++ b/src/libfishsound/flac.c
+@@ -56,6 +56,13 @@
+ 
+ #define BITS_PER_SAMPLE 24
+ 
++#if defined(HAVE_FLAC_1_1_3)
++#  define flac_callback_bytes_type size_t
++#else
++#  define flac_callback_bytes_type unsigned int
++#endif
++
++
+ typedef struct _FishSoundFlacInfo {
+   FLAC__StreamDecoder *fsd;
+   FLAC__StreamEncoder *fse;
+@@ -106,7 +113,7 @@ fs_flac_command (FishSound * fsound, int command, void * data, int datasize)
+ #if FS_DECODE
+ static FLAC__StreamDecoderReadStatus
+ fs_flac_read_callback(const FLAC__StreamDecoder *decoder,
+-                      FLAC__byte buffer[], unsigned int *bytes,
++                      FLAC__byte buffer[], flac_callback_bytes_type *bytes,
+                       void *client_data)
+ {
+   FishSound* fsound = (FishSound*)client_data;
+@@ -121,7 +128,7 @@ fs_flac_read_callback(const FLAC__StreamDecoder *decoder,
+   }
+ 
+   memcpy(buffer, fi->buffer, fi->bufferlength);
+-  *bytes = (unsigned int)fi->bufferlength;
++  *bytes = (flac_callback_bytes_type)fi->bufferlength;
+   fi->bufferlength = 0;
+   return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+@@ -346,7 +353,7 @@ dec_err:
+ #if FS_ENCODE
+ static FLAC__StreamEncoderWriteStatus
+ fs_flac_enc_write_callback(const FLAC__StreamEncoder *encoder,
+-                           const FLAC__byte buffer[], unsigned bytes,
++                           const FLAC__byte buffer[], flac_callback_bytes_type bytes,
+                            unsigned samples, unsigned current_frame,
+                            void *client_data)
+ {
+@@ -354,7 +361,7 @@ fs_flac_enc_write_callback(const FLAC__StreamEncoder *encoder,
+   FishSoundFlacInfo *fi = fsound->codec_data;
+ 
+   debug_printf(1, "IN");
+-  debug_printf(1, "bytes: %d, samples: %d", bytes, samples);
++  debug_printf(1, "bytes: %lld, samples: %d", (long long) bytes, samples);
+ 
+   if (fsound->callback.encoded) {
+     FishSoundEncoded encoded = (FishSoundEncoded) fsound->callback.encoded;
diff --git a/debian/patches/series b/debian/patches/series
index 28d419a..e708302 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Patch-configure.ac-to-specify-config-macro-dir.patch
 0002-flac-set-vendor_string.length-0.patch
+0003-Fix-incompatible-flac-callback-types.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xiph/libfishsound.git



More information about the pkg-xiph-commits mailing list