aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* decoder/ffmpeg: use memset() to initialize AVProbeDataMax Kellermann2014-09-091-0/+6
|
* decoder/ffmpeg: pass MIME type to ffmpeg/libav version 11Max Kellermann2014-09-071-0/+7
| | | | | | | That attribute was uninitialized before, which could crash libavformat. See Debian bug 760669
* Decoder*: add more assertionsMax Kellermann2014-09-072-0/+7
|
* DecoderThread: clear the pipe when handling late SEEKMax Kellermann2014-09-071-1/+11
| | | | | See code comment. Fixes assertion failure in decoder_command_finished().
* decoder/audiofile: fix crash after seekingMax Kellermann2014-09-061-1/+1
| | | | | | Log call was added to the wrong branch. Fixes regression by commit ca1a1149
* protocol/ArgParser: fix integer overflow in parse_range()Max Kellermann2014-09-041-2/+2
| | | | | | | | | | | | | Casting std::numeric_limits<unsigned>::max() to "long" leads to an overflow if sizeof(unsigned)==sizeof(long), and the result will be -1. This happens on some 32 bit architectures, for example ARM and WIN32. Workaround: use std::numeric_limits<int>::max(), which is the largest signed integer. Since sizeof(long)>=sizeof(int), this will never overflow. Fixes Mantis ticket 0004080.
* PlaylistControl: use SeekSongOrder(current) to keep current songMax Kellermann2014-08-311-1/+1
| | | | | | The "current" attribute is a "song order", not a "song position". This is usually the same - except in random mode. Fixes Mantis ticket 0004073.
* PlaylistControl: move code to new method SeekSongOrder()Max Kellermann2014-08-312-7/+19
|
* output/alsa: fix endless loop at end of file in dsd_usb modeMax Kellermann2014-08-311-0/+9
|
* output/{alsa,oss}: add assertionsMax Kellermann2014-08-312-0/+6
|
* decoder/gme: fix song durationMax Kellermann2014-08-291-1/+1
| | | | The unit of gme_info_t::length is milliseconds, not centiseconds.
* event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout()Max Kellermann2014-08-241-1/+1
| | | | The previous commit was broken. D'oh!
* event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()Max Kellermann2014-08-241-1/+3
| | | | | | The IsActive() method returned true even if the timer was not active, after it completed once. This broke the state file timer, and the state file was not saved periodically.
* system/ByteOrder: <endian.h> is a non-standard header that only Linux provides.Thomas Klausner2014-08-231-0/+10
|
* decoer/dsdiff: fix endless loop on malformed fileMax Kellermann2014-08-211-1/+1
| | | | Same bug as in the previous commit.
* decoer/dsf: fix endless loop on malformed fileMax Kellermann2014-08-211-1/+1
| | | | | | | When the data chunk size is not a multiple of the frame size, the last partial frame lead to an endless loop. We fix this by checking chunk_sze>=frame instead of chunk_sze>0. This way, the partial frame is simply skipped.
* util: Fix header for strcasecmpFrançois Revol2014-08-161-1/+1
| | | | | | | | | | | | | | | | | According to POSIX and both OSX and Linux manpages, strcasecmp comes from strings.h, not string.h. Most OSes also have them available in string.h, but we just fixed the headers on Haiku and it now only provides them in strings.h. We might want to fall back to string.h for other OSes though... cf. http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html http://linux.die.net/man/3/strcasecmp https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html
* decoder/ffmpeg: use avcodec_descriptor_get() to determine codec nameMax Kellermann2014-08-131-0/+9
| | | | | | In version 11, both ffmpeg and libav deprecate AVCodecContext::codec_name. The function avcodec_descriptor_get() has been introduced long ago.
* event/BufferedSocket: fix inversed buffer checkMax Kellermann2014-08-071-1/+1
| | | | | This was broken by commit 84d20d9e, which deleted the "!" from the check.
* Win32Main: move to win32/Max Kellermann2014-08-023-1/+1
|
* decoder/dsdiff: simplify dsdlib_skip() callMax Kellermann2014-07-121-4/+3
|
* decoder/dsdiff: simplify loop condition, merge branchesMax Kellermann2014-07-121-7/+2
|
* decoder/dsdiff: ignore garbage null byte at end of fileMax Kellermann2014-07-121-1/+1
| | | | | Failure to read another chunk header is not fatal. Continue to read metadata.
* decoder/dsdiff: fix metadata parser bug (uninitialized variables)Max Kellermann2014-07-121-1/+4
|
* decoder/faad: estimate song duration for remote filesMax Kellermann2014-07-121-0/+22
| | | | | | | | Previously, MPD tried to slurp the whole song file, count the number of frames and calculate the song duration from that. That however is extremely expensive for remote files, and will delay playback for a long time. Workaround: check only the first 128 frames and try to extrapolate from here. Fixes Mantis ticket 0004035.
* DecoderBuffer: add method _available()Max Kellermann2014-07-122-0/+13
|
* DecoderBuffer: add method _get_stream()Max Kellermann2014-07-122-0/+10
|
* decoder/faad: bail out early if sample rate is invalidMax Kellermann2014-07-121-0/+2
|
* decoder/faad: use adts_check_frame() in faad_song_duration()Max Kellermann2014-07-121-2/+1
| | | | Eliminate more duplicate code.
* decoder/faad: test "seekable" after ADTS frame checkMax Kellermann2014-07-121-1/+5
| | | | | Don't bother to check for ADIF just because the stream is not seekable.
* decoder/faad: move code to faad_decoder_new()Max Kellermann2014-07-121-14/+17
| | | | Merge some duplicate code.
* decoder/faad: remove unnecessary readMax Kellermann2014-07-121-2/+0
| | | | Eliminate some overhead when the caller doesn't need the buffer.
* DecoderBuffer: add "pure" attributesMax Kellermann2014-07-121-0/+4
|
* DecoderBuffer: add method _clear()Max Kellermann2014-07-123-8/+12
|
* decoder/faad: check sample_rate, not frames_per_secondMax Kellermann2014-07-111-2/+4
| | | | Checking the integer is faster, easier and more reliable.
* decoder/faad: make variables more localMax Kellermann2014-07-111-71/+49
|
* decoder/faad: use MAX_CHANNELSMax Kellermann2014-07-111-4/+2
| | | | .. instead of declaring a new constant.
* decoder/sndfile: use decoder_read_full()Max Kellermann2014-07-111-16/+6
| | | | | Replaces the loop in sndfile_vio_read(), eliminating duplicate and fragile code.
* decoder/sndfile: use decoder_read()Max Kellermann2014-07-111-16/+22
| | | | .. instead of InputStream::LockRead(). The former is cancellable.
* decoder/sndfile: log seek errorsMax Kellermann2014-07-111-1/+4
|
* decoder/audiofile: log seek errorsMax Kellermann2014-07-111-0/+1
|
* decoder/audiofile: fix typo in commentMax Kellermann2014-07-111-1/+1
|
* PlaylistEdit: postpone UpdateQueuedSong() when adding multiple songsMax Kellermann2014-07-117-1/+109
| | | | | | | | | | Implement a "bulk" edit mode that postpones both UpdateQueuedSong() and OnModified(). This way, the playlist version gets incremented only once. More importantly: when adding multiple songs to a queue that consists of only one song, the first song that got added will always be played next. By postponing this choice, all newly added songs get a chance to become the next song. Fixes the second (and last) part of Mantis ticket 0004005.
* QueueCommands: make "result" more localMax Kellermann2014-07-111-3/+2
|
* Playlist: randomize next song when enabling "random" mode while not playingMax Kellermann2014-07-111-1/+3
| | | | | | Don't restore the current song after shufflung when MPD is stopped (but still remembers the current song internally). Fixes the first part of Mantis ticket 0004005.
* PlaylistControl: update code commentMax Kellermann2014-07-111-1/+1
|
* decoder/dsd: use decoder_read_full() where appropriateJoff2014-07-094-31/+19
| | | | | | | Addresses Mantis ticket 0004015. [mk: use decoder_read_full() only when needed, and a few formal changes]
* decoder/audiofile: use decoder_read_full()Max Kellermann2014-07-091-1/+6
| | | | | Works around WAV stream playback bug, because libaudiofile does not like partial reads (Mantis 0004028).
* DecoderAPI: add function decoder_read_full()Max Kellermann2014-07-093-12/+31
| | | | Move code from the "mad" plugin.
* DecoderAPI: add function decoder_skip()Max Kellermann2014-07-093-14/+25
| | | | Move code from the "mad" plugin.