aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-20ogg: moved the "errorStr" variable into the error handlerMax Kellermann1-1/+2
2008-11-20aac: get rid of gcc warningsLaszlo Ashin1-2/+2
2008-11-20update: pass UTF-8 path to skip_symlink()Konstantin Sobolev1-3/+2
skip_symlinks() expects an UTF-8 encoded file name, but updateDirectory() passed ent->d_name (in file system encoding) to it. Convert it to UTF-8 first.
2008-11-20mapper: use the utf8_to_fs_charset() resultKonstantin Sobolev1-1/+1
In map_directory_child_fs(), the result of utf8_to_fs_charset() was never used, because it passed the unmodified "name" parameter to pfx_dir().
2008-11-20path: fix g_convert() argument orderKonstantin Sobolev1-2/+2
g_convert() wants the destination character set first. This was mixed up.
2008-11-20ogg: check the ov_read() return value before the vorbis_info evaluationMax Kellermann1-7/+6
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().
2008-11-20input_curl: don't fail when seek to EOF is requestedMax Kellermann1-0/+8
HTTP servers respond with "416 Requested Range Not Satisfiable" when a client attempts to seek to the end of the file. Catch this special case in input_curl_seek(). This fixes a glitch in the ogg vorbis decoder plugin.
2008-11-20curl: don't check running_handles for EOFMax Kellermann1-7/+1
Since we are using curl_multi_info_read() / CURLMSG_DONE for detecting end-of-response, we can remove all running_handles==0 checks. For some reason, that has never worked correctly.
2008-11-20input_curl: always set eof=true on CURLMSG_DONEMax Kellermann1-5/+7
curl_multi_info_read() is the authoritative source of the "end-of-response" information. Always set c->eof when a CURLMSG_DONE message is received, and check the result (success/failure) after that.
2008-11-19wavpack: redo using audio_format_frame_size()Laszlo Ashin1-6/+1
Somehow we lost 600e1322 after renaming some variables in ed6f6046.
2008-11-18decoder: pass the correct buffer length to pcm_convert()Max Kellermann1-5/+6
When a global audio format is configured (setting "audio_output_format"), decoder_data() overwrote the "length" parameter with the size of the output buffer (result of pcm_convert_size()). Declare a separate variable for the output buffer length.
2008-11-18ffmpeg: read tags from AVFormatContextViliam Mateicka1-5/+16
The ffmpeg library provides some of the song metadata in the AVFormatContext struct. Pass it from there to MPD.
2008-11-18audiofile: fixed misplaced ifViliam Mateicka1-2/+1
[mk: by definition, tag_new() cannot fail - removed check]
2008-11-18music_pipe: narrowed assertion on chunk indexMax Kellermann1-1/+1
The chunk index passed to successor() must be valid, i.e. it must be smaller than num_chunks.
2008-11-16input_stream: size==-1 means unknown sizeMax Kellermann6-2/+15
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
2008-11-16ffmpeg: fixed AVSEEK_SIZEMax Kellermann1-3/+9
With whence==AVSEEK_SIZE, the seek function should return the file size, not the current offset. Check the return value of input_stream_seek().
2008-11-16aac: detect whether to pass "uint32_t*" to NeAACDecInit2()Max Kellermann2-7/+31
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*".
2008-11-15decoder: check length==0 in decoder_read()Max Kellermann2-0/+7
When the caller passes length==0, decoder_read() entered an endless loop. Check that condition before entering the "while" loop.
2008-11-15aac: fix compiler warnings on amd64Laszlo Ashin1-2/+2
2008-11-15aac: don't try to free static bufferLaszlo Ashin1-4/+0
In 432da18e a dynamic buffer was replaced by a static one but some frees were accidently left there which caused some segfaults.
2008-11-14log: check the log threshold in log_func()Max Kellermann1-0/+3
The threshold was only checked in the deprecated logging functions (ERROR(), WARNING(), ...). Add the check to the GLib logging handler.
2008-11-14volume: eliminate alloca() usageMax Kellermann1-11/+4
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.
2008-11-14volume: moved code to oss_mixer_find()Max Kellermann1-14/+23
2008-11-14player: don't queue song when there are 2 songs in the pipeMax Kellermann1-0/+5
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.
2008-11-14player: wake up decoder before waiting for xfade chunksMax Kellermann1-0/+1
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().
2008-11-14wavpack: be more robust if the underlying stream is not seekableLászló Áshin1-1/+5
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.
2008-11-14wavpack: tolerate less decoded data than requestedLászló Áshin1-1/+1
Wavpack plugin doesn't stop decoding if a block couldn't be fully decoded, rather it tries to go on.
2008-11-14wavpack: renamed variables and modified coding style slightlyLászló Áshin1-80/+113
2008-11-13mp3: fix SEEK command check after mp3_synth_and_send()Max Kellermann1-5/+3
mp3 seeking was broken, because the command==SEEK check was never reached. Swap the command check order (==SEEK before !=NONE) to fix that.
2008-11-13decoder: additional dc.command checks in decoder_data()Max Kellermann1-0/+3
When a command is sent while the decoder waits for a free chunk in the music pipe, it was not returned by decoder_data().
2008-11-13decoder: wait for the player only if the music pipe is fullMax Kellermann1-4/+5
Prevent superfluous wakeups and a deadlock condition.
2008-11-13decoder: check dc.command at the beginning of decoder_data()Max Kellermann1-0/+4
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().
2008-11-13player: chop the tail of the music pipe after CANCELMax Kellermann3-0/+19
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.
2008-11-13music_pipe: continuously check the sample format of all chunksMax Kellermann3-0/+29
Provide a debug function which asserts on the sample format of all chunks. Call this function in each iteration of the player main loop.
2008-11-13decoder: ignore SEEK commands during initializationMax Kellermann1-1/+4
When the decoder receives a SEEK during initialization, it should ignore that for now. The old code made most decoders abort.
2008-11-13music_pipe: check for partial frames in appended chunkMax Kellermann1-0/+2
Added an additional assertion which checks partial frames in the existing tail chunk.
2008-11-13player: assert that there was no previous "next song chunk"Max Kellermann1-0/+1
When assigning the next_song_chunk variable, it must have been empty. If not, there may be 3 songs overlapping in the music pipe.
2008-11-12playlist: call clearPlayerQueue() only if song is queued IIMax Kellermann1-14/+10
This patch extends commit 35a16b99, and amends several 2 missing checks. It simplifies 2 more checks by merging "if" conditions.
2008-11-12wavpack: remove commented debug messagesMax Kellermann1-6/+1
2008-11-12wavpack: calculate outsamplesize with audio_format_frame_size()Max Kellermann1-5/+1
2008-11-12ogg: revert "use ogg_fopen() instead of ogg_open()"Max Kellermann1-6/+9
Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2.
2008-11-12aac: shift the input buffer before the full checkMax Kellermann1-4/+5
When the buffer was full, but everything was already consumed, fillAacBuffer() would not attempt to flush and refill it.
2008-11-12aac: make the input buffer staticMax Kellermann1-9/+4
Allocate the input buffer within the AacBuffer struct.
2008-11-12aac: reject SEEK commandsMax Kellermann1-1/+3
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.
2008-11-12aac: get decoder command from decoder_data()Max Kellermann1-4/+5
Removed a superfluous decoder_get_command() call.
2008-11-12aac: convert audio_format to temporary variableMax Kellermann1-5/+6
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
2008-11-12aac: removed method file_decode()Max Kellermann1-124/+1
aac_stream_decode() was basically copy+pasted from aac_decode(). Since stream_decode() can also decode files, eliminate aac_decode().
2008-11-12aac: check the buffer length in the ADIF parserMax Kellermann1-0/+6
Check whether enough data has been read yet.
2008-11-12aac: use unsigned integers and size_t where appropriateMax Kellermann1-5/+6
2008-11-12aac: check if the stream is seekable before length checkMax Kellermann1-1/+2
If the stream is not seekable, don't try to decode all frames to find out the total song time.