Age | Commit message (Collapse) | Author |
|
Decoder plugins must not send partial frames.
|
|
Due to rounding errors, it was possible that the fallback resampler
returned partial frames.
|
|
Calling input_curl_select() after EOF has been reached causes an
assertion failure. This can happen if the HTTP response is empty.
Check c->eof before calling input_curl_select().
|
|
Set the "ready" flag for empty resources.
|
|
To check for early connect failures, call curl_multi_info_read() in
the constructor input_curl_open(). This fixes an assertion failure.
|
|
When a song file is deleted during database update, all pointers to it
must be removed from the playlist. The "for" loop in
deleteASongFromPlaylist() did not deal with multiple copies of the
deleted song properly, and left instances of the (to-be-invalidated)
pointer in. Fix this by reversing the loop.
|
|
matchesAnMpdTagItemKey() broke when two tag items had the same prefix,
because it did not check if the tag name ended after the prefix. Add
a check for the colon and the space after the tag name.
|
|
If http_proxy_{host, port, user, password} are provided in mpd.conf
they are not passed on to libcurl. As a result mpd cannot stream from
behind an http proxy.
The attached patch `http_proxy.patch` makes the relevant calls to
curl_easy_setopt(...) for all proxy configuration parameters, but is
only tested for host and port.
|
|
MPD's shuffling algorithm was not implemented well: it considers songs
which were already swapped, making it somewhat non-random.
Fix the Fisher-Yates shuffle algorithm by passing the proper bounds to
the PRNG.
|
|
srandom() and random() are not portable. Use GLib's implementation.
|
|
When decoder_run_song() (decoder_thread.c) waits for the input stream
to become ready, it did that in a busy loop. Add a select() call to
input_curl_buffer() during connect/handshake (i.e. before the first
chunk of body data was received), to let the CPU relax.
|
|
When the decoder thread is waiting for free chunks in the music pipe,
don't ignore the STOP command. Just return dc.command without further
checks.
|
|
Save an empty database, even if the music directory is empty.
|
|
Don't use libc's rand() function, because it is slow. Our own trivial
linear congruential generator is good enough for dithering.
|
|
|
|
Don't call command_error() if loading a song from the playlist fails.
This may result in assertion failures, since command_error() may be
called more than once.
|
|
When the decoder of the new song is not fast enough, the player thread
has to wait for it for a moment. However the variable "nextChunk" was
reset to -1 during that, making the next loop iteration assume that
cross-fading has not begun yet. This patch overwrites it with "0"
while waiting.
|
|
This patch fixes a minor memory leak: when decoder_tag() attempted to
send a merged tag object (created by tag_add_stream_tags()), and was
interrupted by a decoder command, it did not free the temporary merged
tag object.
|
|
JACK documentation states: "The caller is responsible for calling
free(3) any non-NULL returned value."
This does not seem to include the array elements. Duplicate them
after jack_get_ports(), and free only the array. Convert
JackData.output_ports to non-const.
|
|
Add G_GNUC_UNUSED attributes.
|
|
Removed the fallback setenv() implementation for solaris.
|
|
If a log message does not include a newline character, append it.
|
|
Fix for bug #1491.
|
|
I tried to search for a certain composer in my collection, but only
non-mp4 files showed up. The source code reveals that this tag is not
read. This can be fixed by reading the 'Writer' tag field, in
mp4_plugin.c, in function mp4_load_tag.
I actually tried this, and after compiling with those lines added,
also mp4 (.m4a) files showed up when searching for a composer.
|
|
When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD
broke all playlists when manipulated using the "playlistdelete"
command. The reason was that map_directory_child_fs() was used, which
doesn't accept slashes in the file name. Use the new map_uri_fs()
function instead.
|
|
With a large maximum playlist length, the integer multiplication
"playlist_max_length * MPD_PATH_MAX" may overflow. Change that to a
division. This was not a dangerous bug, since it was only used for
a quick estimate.
|
|
The old code casted it to a 32 bit integer, which cut off bits.
AVFormatContext.duration is a int64_t, so use this type.
|
|
Use NULL instead. Found by sparse.
|
|
Added missing includes.
|
|
Add G_GNUC_UNUSED attributes.
|
|
Add a G_GNUC_UNUSED attribute.
|
|
It is illegal to pass an empty audio buffer around. pcm_resample()
sometimes seems to result in 0 samples, maybe related to
libsamplerate. To work around that problem, add special checks after
both pcm_convert() invocations. Removed the pcm_resample()==0 checks
from pcm_convert().
|
|
When a response is very long (e.g. a large playlist > 100k songs),
most of it will end up in the deferred buffers. Filling the deferred
queue is very expensive currently, because a new buffer is allocated
for every client_write() operation. This may lead to long delays, and
the client might give up and disconnect meanwhile. This patch makes
MPD attempt to flush the deferred queue as often as possible, to work
around this problem. Due to the MPD 0.14 code freeze, we should not
optimize the buffering code now.
|
|
|
|
|
|
|
|
Make "secure" a log level different from "default". "secure" should be
right between "default" and "verbose". Map "default" to Glib's
"MESSAGE" log level.
|
|
|
|
getPlayerErrorStr() assumes that pc.errored_song is set when an error
occured. Since the song may have been deleted meanwhile, add a NULL
check.
|
|
When a (remote) song is deleted from the playlist, there may still be
a reference to it in pc.errored_song. Clear this reference.
|
|
least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
|
|
|
|
|
|
|
|
|
|
When a client-specified URI has a scheme which is not supported, do
not try to open it as a local file, but provide a meaningful error
message.
|
|
uri_has_scheme() checks if an URI contains the sub string "://", which
makes MPD assume that it is a remote URI.
|
|
When a file had no file name extension, getSuffix() could return the
extension of the parent directory (if it had one).
|
|
The old getSuffix() code was quite wasteful, and can be replaced
completely with strrchr().
|
|
Use the C99 "bool" data type instead of "int".
|