[Pkg-mpd-commits] [pkg-mpd] 06/07: Add patches for wildmidi 0.4 from upstream git

Florian Schlichting fsfs at moszumanska.debian.org
Thu Aug 18 21:55:28 UTC 2016


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

fsfs pushed a commit to branch master
in repository pkg-mpd.

commit 1ef91518a59134f604e521484fee4765caffb614
Author: Florian Schlichting <fsfs at debian.org>
Date:   Thu Aug 18 23:45:20 2016 +0200

    Add patches for wildmidi 0.4 from upstream git
---
 ...der-wildmidi-move-code-to-wildmidi_output.patch | 54 ++++++++++++++++++++++
 ...-decoder-wildmidi-support-libWildMidi-0.4.patch | 32 +++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 88 insertions(+)

diff --git a/debian/patches/0001-decoder-wildmidi-move-code-to-wildmidi_output.patch b/debian/patches/0001-decoder-wildmidi-move-code-to-wildmidi_output.patch
new file mode 100644
index 0000000..7f535f2
--- /dev/null
+++ b/debian/patches/0001-decoder-wildmidi-move-code-to-wildmidi_output.patch
@@ -0,0 +1,54 @@
+From 25deae6cc7cb49ee02278509c7904d3efc69a00b Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann at gmail.com>
+Date: Mon, 15 Aug 2016 10:07:08 +0200
+Subject: [PATCH] decoder/wildmidi: move code to wildmidi_output()
+
+---
+ src/decoder/plugins/WildmidiDecoderPlugin.cxx | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/src/decoder/plugins/WildmidiDecoderPlugin.cxx b/src/decoder/plugins/WildmidiDecoderPlugin.cxx
+index fc58f09..1c18860 100644
+--- a/src/decoder/plugins/WildmidiDecoderPlugin.cxx
++++ b/src/decoder/plugins/WildmidiDecoderPlugin.cxx
+@@ -65,6 +65,17 @@ wildmidi_finish(void)
+ 	WildMidi_Shutdown();
+ }
+ 
++static DecoderCommand
++wildmidi_output(Decoder &decoder, midi *wm)
++{
++	char buffer[4096];
++	int length = WildMidi_GetOutput(wm, buffer, sizeof(buffer));
++	if (length <= 0)
++		return DecoderCommand::STOP;
++
++	return decoder_data(decoder, nullptr, buffer, length, 0);
++}
++
+ static void
+ wildmidi_file_decode(Decoder &decoder, Path path_fs)
+ {
+@@ -94,18 +105,11 @@ wildmidi_file_decode(Decoder &decoder, Path path_fs)
+ 
+ 	DecoderCommand cmd;
+ 	do {
+-		char buffer[4096];
+-		int len;
+-
+ 		info = WildMidi_GetInfo(wm);
+ 		if (info == nullptr)
+ 			break;
+ 
+-		len = WildMidi_GetOutput(wm, buffer, sizeof(buffer));
+-		if (len <= 0)
+-			break;
+-
+-		cmd = decoder_data(decoder, nullptr, buffer, len, 0);
++		cmd = wildmidi_output(decoder, wm);
+ 
+ 		if (cmd == DecoderCommand::SEEK) {
+ 			unsigned long seek_where =
+-- 
+2.8.1
+
diff --git a/debian/patches/0001-decoder-wildmidi-support-libWildMidi-0.4.patch b/debian/patches/0001-decoder-wildmidi-support-libWildMidi-0.4.patch
new file mode 100644
index 0000000..60f65c7
--- /dev/null
+++ b/debian/patches/0001-decoder-wildmidi-support-libWildMidi-0.4.patch
@@ -0,0 +1,32 @@
+From a546bfe7d998274bf936225aa89b05cd46cb0888 Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann at gmail.com>
+Date: Mon, 15 Aug 2016 10:08:35 +0200
+Subject: [PATCH] decoder/wildmidi: support libWildMidi 0.4
+
+---
+ NEWS                                          | 2 ++
+ src/decoder/plugins/WildmidiDecoderPlugin.cxx | 7 +++++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/src/decoder/plugins/WildmidiDecoderPlugin.cxx b/src/decoder/plugins/WildmidiDecoderPlugin.cxx
+index 1c18860..e5dbabe 100644
+--- a/src/decoder/plugins/WildmidiDecoderPlugin.cxx
++++ b/src/decoder/plugins/WildmidiDecoderPlugin.cxx
+@@ -68,7 +68,14 @@ wildmidi_finish(void)
+ static DecoderCommand
+ wildmidi_output(Decoder &decoder, midi *wm)
+ {
++#ifdef LIBWILDMIDI_VER_MAJOR
++	/* WildMidi 0.4 has switched from "char*" to "int8_t*" */
++	int8_t buffer[4096];
++#else
++	/* pre 0.4 */
+ 	char buffer[4096];
++#endif
++
+ 	int length = WildMidi_GetOutput(wm, buffer, sizeof(buffer));
+ 	if (length <= 0)
+ 		return DecoderCommand::STOP;
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 14dd1e7..2c3d78e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,5 @@ bind-to-address-socket-activation.patch
 prune-doc-data.patch
 mpd.service.documentation.patch
 mpd.service.documentation.user.patch
+0001-decoder-wildmidi-move-code-to-wildmidi_output.patch
+0001-decoder-wildmidi-support-libWildMidi-0.4.patch

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



More information about the Pkg-mpd-commits mailing list