Gustavo Zacarias | 26 Jan 14:42 2015
Picon

[PATCH] thread/Name: include stdio.h for prctl as well

We're still using snprintf so we need it, otherwise it leads to build
failure.

Signed-off-by: Gustavo Zacarias <gustavo <at> zacarias.com.ar>
---
 src/thread/Name.hxx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/thread/Name.hxx b/src/thread/Name.hxx
index 1576b3f..8d46d33 100644
--- a/src/thread/Name.hxx
+++ b/src/thread/Name.hxx
 <at>  <at>  -26,6 +26,7  <at>  <at> 
 #  include <stdio.h>
 #elif defined(HAVE_PRCTL)
 #  include <sys/prctl.h>
+#  include <stdio.h>
 #  ifdef PR_SET_NAME
 #    define HAVE_THREAD_NAME
 #  endif
--

-- 
2.0.5

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Felix Salfelder | 23 Jan 22:46 2015

mixer-only alsa output (feature request)

Hi there.

thanks for mpd!

i have mpd outputing audio to jack.

audio_output {
	type        "jack"
	name      "My JACK Device"
}

and i use an alsa output just to remote control a mixer.

audio_output {
	type            "alsa"
	name            "My ALSA Mixer"
	device          "none"  # <=
	mixer_device    "hw:1"
	mixer_control   "Master"
}

this is working perfectly, as intended. however, mpd actually tries to
use alsa for output as well. and complains a lot, spamming the log file.

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM none
Jan 23 21:31 : alsa_output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "none": No
such file or directory

it would be nice to have some way to disable this. see below for the simplest patch i can think of.

(Continue reading)

Alexander Hall | 15 Jan 22:03 2015
Picon

Fwd: mpc diff - mpc git diff

Fix use-after-free in mpc / cmd_seek()

Please cc me any reply as I'm not a subscriber of the list.

/Alexander

diff --git a/src/command.c b/src/command.c
index 02894aa..31a2c72 100644
--- a/src/command.c
+++ b/src/command.c
 <at>  <at>  -458,11 +458,11  <at>  <at>  cmd_seek(gcc_unused int argc, gcc_unused char **argv, struct mpd_connection *con
 	if (seekto > (int)mpd_status_get_total_time(status))
 		DIE("Seek amount would seek past the end of the song\n");

-	mpd_status_free(status);
-
 	if (!mpd_run_seek_id(conn, mpd_status_get_song_id(status), seekto))
 		printErrorAndExit(conn);

+	mpd_status_free(status);
+
 	return 1;
 }

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Wieland Hoffmann | 12 Jan 11:37 2015
Picon

[PATCH] doc/protocol.xml: Fix a typo

---
 doc/protocol.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/protocol.xml b/doc/protocol.xml
index d56b09f..9bd1854 100644
--- a/doc/protocol.xml
+++ b/doc/protocol.xml
 <at>  <at>  -238,7 +238,7  <at>  <at> 
         "before" the current song in that sequence) will only be
         scheduled for repeated playback if its priority has become
         bigger than the priority of the current song.  Decreasing the
-        priority of a song will moved it farther to the end of the
+        priority of a song will move it farther to the end of the
         sequence.  Changing the priority of the current song has no
         effect on the sequence.  During playback, a song's priority is
         reset to zero.
--

-- 
2.2.1

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Reventlov | 1 Jan 18:30 2015

[PATCH] Fixing the systemd service file against systemd>205

Hello.
Since Systemd 205, the low-level cgroup configuration options
ControlGroup= and ControlGroupAttribute= have been removed.

Relevant upstream changelog:
http://lists.freedesktop.org/archives/systemd-devel/2013-July/011679.html

Thoses options should be disabled. Preserving the pre-systemd
205 behavior toward realtime is behind my scope, but I think it can be
achieved by using (I guess) IOSchedulingClass.

Happy new year, patch is attached.
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Vincent Mussard | 28 Dec 18:05 2014
Picon

PATCH : Add option to set cache size of libcdio_paranoia

Dear all

Here is a little patch that add an option "cache_size" to the 
cdio_paranoia plugin.
This option set the libcdio_paranoia cache size (in sector), which is by 
default very high (1200 sectors == 16 seconds).
On my setup (raspberry pi + usb dvd drive) this default value cause 
sound to drop every 16 seconds. With a small value of 75 sectors, it 
works much better.
Patch is based on mpd 0.18.21.

Thank you

Regards

Vincent
Attachment (patch_paranoia.patch): text/x-patch, 1289 bytes
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Jan Brittenson | 23 Dec 07:26 2014
Picon

DSF ID3 tags hitting 4k size limit

Here’s a change to dynamically allocate the DSD ID3 tag buffer.  Pretty much anything with cover art
is going to exceed the existing, static 4k limit...  Here’s a change to dynamically allocate the buffer and
sanity check it at some upper limit.  I rather arbitrarily pulled 256k out of thin air just to keep a corrupt
file from causing it to trying to allocate a buffer larger than available memory.

diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index 13f6bc8..9ac986b 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
 <at>  <at>  -29,6 +29,7  <at>  <at> 
 #include "input/InputStream.hxx"
 #include "tag/TagId3.hxx"
 #include "util/Error.hxx"
+#include "util/Alloc.hxx"

 #include <string.h>

 <at>  <at>  -123,22 +124,27  <at>  <at>  dsdlib_tag_id3(InputStream &is,

 	const id3_length_t count = size - offset;

-	/* Check and limit id3 tag size to prevent a stack overflow */
-	id3_byte_t dsdid3[4096];
-	if (count == 0 || count > sizeof(dsdid3))
+	if (count < 10 || count > 256*1024)
 		return;

-	if (!decoder_read_full(nullptr, is, dsdid3, count))
+	id3_byte_t *const id3_buf = static_cast<id3_byte_t*>(xalloc(count));
+
(Continue reading)

Jan Brittenson | 23 Dec 06:47 2014
Picon

Build error w/libavutil 52.3.0

Cloned the git master (last commit 7f3fecbdf581faf7e98135d5cac535dee6faedf5) and when building get the
following error with libavutil 52.3.0 installed:

make  all-am
make[1]: Entering directory `/home/bson/src/mpd'
g++ -DHAVE_CONFIG_H -I.  -DNDEBUG -I./src -isystem /usr/include/glib-2.0 -isystem
/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include
-DSYSTEM_CONFIG_FILE_LOCATION='"/usr/local/etc/mpd.conf"'              -I/usr/include/opus    
-I/usr/include/libbinio    -D_GNU_SOURCE -std=gnu++0x -pthread -g -O2 -fvisibility=hidden
-fno-threadsafe-statics -fmerge-all-constants -fno-exceptions -fno-rtti -ffast-math
-ftree-vectorize -ffunction-sections -fdata-sections -Wall -Wextra -Wmissing-declarations
-Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -MT
src/decoder/plugins/libdecoder_a-FfmpegDecoderPlugin.o -MD -MP -MF
src/decoder/plugins/.deps/libdecoder_a-FfmpegDecoderPlugin.Tpo -c -o
src/decoder/plugins/libdecoder_a-FfmpegDecoderPlugin.o `test -f
'src/decoder/plugins/FfmpegDecoderPlugin.cxx' || echo './'`src/decoder/plugins/FfmpegDecoderPlugin.cxx
In file included from src/decoder/plugins/FfmpegDecoderPlugin.cxx:30:0:
./src/lib/ffmpeg/Buffer.hxx: In destructor ‘FfmpegBuffer::~FfmpegBuffer()’:
./src/lib/ffmpeg/Buffer.hxx:53:15: error: ‘av_free’ was not declared in this scope
   av_free(data);
               ^
make[1]: *** [src/decoder/plugins/libdecoder_a-FfmpegDecoderPlugin.o] Error 1
make[1]: Leaving directory `/home/bson/src/mpd'
make: *** [all] Error 2

Looking at Buffer.hxx it doesn’t seem as if I got libavutil/mem.h included.  The following change gets it
building cleanly:

diff --git a/src/lib/ffmpeg/Buffer.hxx b/src/lib/ffmpeg/Buffer.hxx
index eab1be8..795a0f6 100644
(Continue reading)

Michael Van Buren | 21 Dec 22:06 2014
Picon

git account request (fixed)

real name: Michael Van Buren
email: mikevb1 <at> gmx.com
user: mikevb1
projects: mpc
public ssh key attached
Attachment (id_rsa.pub): application/octet-stream, 394 bytes
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Pizzocel | 15 Dec 00:14 2014
Picon

Tags from Input plugins

Hi,

I'm trying to write an input plugin. It determines the content of the
tag at the time the stream is opened. I thought, the tag should then be
delivered as the result of the first call to ReadTag. Subsequent calls
should return nullptr, as the tag would not change until the stream is
closed.
But I found, that this did not work as I expected.
The reason is, that when update_stream_tag in DecoderAPI.cxx gets
nullptr from the second call to ReadTag (via LockReadTag, it overwrites
the stream tag with song_tag.

My work around is to send nullptr from the first call to ReadTag.
This causes song_tag to be set to nullptr. Then the tag that I want
to be attached to the stream is sent in the next call to ReadTag.
This way it will no longer be overwritten.

For me a more intuitive behaviour would be to set the stream_tag to
song_tag before the first call to update_stream_tag, and only set
stream_tag to values != nullptr returned from ReadTag in update_stream_tag.

Regards,
 Pizzocel

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Jörg Krause | 7 Dec 22:40 2014
Picon

[PATCH 1/2] thread/Id.hxx: fix musl build error

This patch fix a build error with the musl C library. The patch is originally
taken from Alpine Linux:
http://git.alpinelinux.org/cgit/aports/tree/main/mpd/fix-musl.patch.

musl declares pthread_equal both as a macro and as a function. Without the
parentheses the preprocessor expands pthread_equal to ::((id)==(other.id))
which obviously fails.

Using parentheses prevents the preprocessor from expansion and the compiler
looks up for the function declaration of pthread_equal in the global namespace.

Signed-off-by: Jörg Krause <jkrause <at> posteo.de>
---
 src/thread/Id.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/Id.hxx b/src/thread/Id.hxx
index 7b10de0..c4e514e 100644
--- a/src/thread/Id.hxx
+++ b/src/thread/Id.hxx
 <at>  <at>  -84,7 +84,7  <at>  <at>  public:
 #ifdef WIN32
 		return id == other.id;
 #else
-		return ::pthread_equal(id, other.id);
+		return (::pthread_equal)(id, other.id);
 #endif
 	}

--

-- 
(Continue reading)


Gmane