| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The input_stream object should only be closed by the MPD core
(i.e. decoder_thread.c / decoder_run()). A decoder plugin which
attempts to close it will result in a segmentation fault.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
configure.ac
src/ls.h
src/output/shout_plugin.c
|
| | |
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Add G_GNUC_UNUSED attributes.
|
| | |
|
| | |
|
|/
|
|
|
| |
Variables which hold one of the DECODE_* values should be declared as
"enum mp3_action" instead of "int".
|
|
|
|
| |
Use GLib's g_warning(), ... instead of MPD's deprecated log.h.
|
|
|
|
| |
SEEK_SET is defined by unistd.h. Explicitly include it.
|
| |
|
|
|
|
| |
Refuse to play audio formats which are not supported by MPD.
|
| |
|
| |
|
| |
|
|
|
|
| |
Removed the superfluous my_usleep() call.
|
| |
|
| |
|
|
|
|
|
|
| |
The ov_info() return value may be corrupt when ov_read() did not
return a positive value. First check for success, then check
ov_info().
|
|
|
|
| |
Somehow we lost 600e1322 after renaming some variables in ed6f6046.
|
|
|
|
|
| |
The ffmpeg library provides some of the song metadata in the
AVFormatContext struct. Pass it from there to MPD.
|
|
|
|
| |
[mk: by definition, tag_new() cannot fail - removed check]
|
|
|
|
|
|
| |
Define the special value "-1" as "unknown size". Previously, there
was no indicator for streams with unknown size, which might confuse
some decoders.
|
|
|
|
|
|
| |
With whence==AVSEEK_SIZE, the seek function should return the file
size, not the current offset. Check the return value of
input_stream_seek().
|
|
|
|
|
|
|
|
|
| |
neaacdec.h declares all arguments as "unsigned long", but internally
expects uint32_t pointers. This triggers gcc warnings on 64 bit
architectures. To avoid that, make configure.ac detect whether we're
using Debian's corrected headers or the original libfaad headers. In
any case, pass a pointer to an uint32_t, conditionally casted to
"unsigned long*".
|
| |
|
|
|
|
|
| |
In 432da18e a dynamic buffer was replaced by a static one but some
frees were accidently left there which caused some segfaults.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
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.
|