| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
In 432da18e a dynamic buffer was replaced by a static one but some
frees were accidently left there which caused some segfaults.
|
| |
|
|
|
|
|
| |
The threshold was only checked in the deprecated logging functions
(ERROR(), WARNING(), ...). Add the check to the GLib logging handler.
|
|
|
|
|
|
| |
alloca() is not a portable function. Don't use it. Using
strncasecmp() is much more efficient anyway, because no memory needs
to be allocated and copied.
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't send a "next song" request to the main thread when the current
song hasn't started playing yet, i.e. there are already two different
songs in the music pipe. This would erase information about the song
boundary within the music pipe, and thus triggered an assertion
failure. The bug could occur when playing very short songs which fit
into the pipe as a whole.
|
|
|
|
|
|
| |
Fix a deadlock: when the decoder waited for buffer space, the player
could enter a deadlock situation because it waits for more chunks for
crossfading chunks. Signal the decoder before entering notify_wait().
|
|
|
|
|
|
|
|
| |
The wavpack open function gives us an option called OPEN_STREAMING. This
provides more robust and error tolerant playback, but it automatically
disables seeking. (More exactly the wavpack lib will not return the
length information.) So, if the stream is already not seekable we can
use this option safely.
|
|
|
|
|
| |
Wavpack plugin doesn't stop decoding if a block couldn't be fully
decoded, rather it tries to go on.
|
| |
|
|
|
|
|
|
| |
mp3 seeking was broken, because the command==SEEK check was never
reached. Swap the command check order (==SEEK before !=NONE) to fix
that.
|
|
|
|
|
| |
When a command is sent while the decoder waits for a free chunk in the
music pipe, it was not returned by decoder_data().
|
| |
|
|
|
|
| |
Prevent superfluous wakeups and a deadlock condition.
|
|
|
|
|
|
| |
Seeking was somewhat broken in some decoder plugins because they sent
empty chunks, and never got a command. Check the decoder command
before doing anything else in decoder_data().
|
|
|
|
|
|
| |
When a CANCEL command is received, the player should drop all chunks
of the next song. Added new funciton music_pipe_chop() which is used
for that.
|
|
|
|
|
| |
Provide a debug function which asserts on the sample format of all
chunks. Call this function in each iteration of the player main loop.
|
|
|
|
|
| |
When the decoder receives a SEEK during initialization, it should
ignore that for now. The old code made most decoders abort.
|
|
|
|
|
| |
Added an additional assertion which checks partial frames in the
existing tail chunk.
|
|
|
|
|
| |
When assigning the next_song_chunk variable, it must have been empty.
If not, there may be 3 songs overlapping in the music pipe.
|
|
|
|
|
| |
This patch extends commit 35a16b99, and amends several 2 missing
checks. It simplifies 2 more checks by merging "if" conditions.
|
| |
|
| |
|
|
|
|
|
| |
Unfortunately, ov_fopen() is not supported by libvorbis versions older
than 1.2.
|
|
|
|
|
| |
When the buffer was full, but everything was already consumed,
fillAacBuffer() would not attempt to flush and refill it.
|
|
|
|
| |
Allocate the input buffer within the AacBuffer struct.
|
|
|
|
|
|
| |
The aac plugin does not support seeking. Reject SEEK requests by
calling decoder_seek_error(). Quit the plugin's main loop only when
STOP is received.
|
|
|
|
| |
Removed a superfluous decoder_get_command() call.
|
|
|
|
|
|
| |
The audio_format variable is only used and initialized for
decoder_initialized(). Move it into that block to save some bytes on
the stack.
|
|
|
|
|
| |
aac_stream_decode() was basically copy+pasted from aac_decode().
Since stream_decode() can also decode files, eliminate aac_decode().
|
|
|
|
| |
Check whether enough data has been read yet.
|
| |
|
|
|
|
|
| |
If the stream is not seekable, don't try to decode all frames to find
out the total song time.
|
|
|
|
| |
Use input_stream_eof() instead.
|
|
|
|
|
|
|
| |
According to the documentation, mpc_decoder_decode() returns an
mpc_uint32_t. Since the special return value (mpc_uint32_t)-1
translates to a very large long integer, this may cause segmentation
faults if not interpreted properly.
|
|
|
|
| |
Don't hard-code the factor "2".
|
|
|
|
| |
Removed 3 superfluous decoder_get_command() invocations.
|
|
|
|
|
| |
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates
3 local variables in mpc_decode().
|
|
|
|
|
|
| |
Don't split the buffer conversion loop. When libmpcdec returns a
chunk, convert and send the whole chunk at a time. This moves several
checks out of the loop, and greatly improves performance.
|
|
|
|
| |
Don't use deprecated MPD libraries.
|
|
|
|
|
| |
The buffer is always casted to int32_t* anyway; declare it as int32_t
array, and remove the cast.
|
|
|
|
|
| |
Since each "eof=true" is followed by "break", the variable is
superfluous.
|
|
|
|
|
| |
Due to an unnoticed merge error, there was a superfluous "}". Remove
it.
|
|
|
|
| |
Move the reponsibility for freeing the file handle to libvorbis.
|
| |
|
|
|
|
|
| |
decoder_file_decode() should check for plugin->file_decode, not
plugin->stream_decode().
|
|
|
|
| |
Eliminate two decoder_get_command() invocations from the main loop.
|
|
|
|
|
| |
Don't let the buffer grow until it is full, flush it whenever there is
data available.
|
|
|
|
|
|
|
| |
Parse ID3 tags, even when they are in the middle of the stream. Very
few streams provide embedded ID3 tags. Most of them send only
Shoutcast "icy" tags, which limits the practical usefulness of this
patch.
|