Commit Graph

172 Commits

Author SHA1 Message Date
Max Kellermann 1b441837f1 decoder/ffmpeg: append file name suffix to virtual stream URL
To allow libavformat to detect the format of the input file, append
the suffix of the input file to the URL of the virtual stream.  This
specifically enables the "shorten" codec, which is supported by
libavformat/raw.c, detected only by the suffix.
2010-01-17 02:36:07 +01:00
Max Kellermann 8ba08edd0e queue: don't repeat current song in consume mode
Check consume mode in queue_next_order(), because the current song
would be deleted as soon as it's finished; it cannot be played again.
2010-01-16 20:58:24 +01:00
Max Kellermann 90d16af66a decoder_thread: fix CUE track playback
The patch "input/file: don't fall back to parent directory" introduced
a regression: when trying to play a CUE track, decoder_run_song()
tries to open the file as a stream first, but this fails, because the
path is virtual.

This patch fixes decoder_run_song() (instead of reverting the previous
patch) to accept input_stream_open() failures if the song is a local
file.  It passes the responsibility to handle non-existing files to
the decoder's file_decode() method.
2010-01-16 19:20:11 +01:00
Max Kellermann 777bd7c1e1 NEWS: added missing entry 2010-01-16 18:41:34 +01:00
Max Kellermann c88f95a2ea input/rewind: new input_stream wrapper to allow stream rewinding
This replaces the rewinding buffer code from the CURL input plugin.
It is more generic, and allows rewinding even when the server sends
Icy-Metadata (which would have been too difficult to implement within
the CURL plugin).

This is a rather complex patch for the stable branch (v0.15.x), but it
fixes a serious problem: the "vorbis" decoder plugin was unable to
play streams with Icy-Metadata, because it couldn't rewind the stream
after detecting the codec (Vorbis vs. FLAC).
2009-12-29 23:55:40 +01:00
Max Kellermann c7d099c757 decoder/{ffmpeg,flac,vorbis}: added more flac/vorbis MIME types
Support deprecated MIME types such as "audio/x-ogg".  Support new
types such as "audio/flac".
2009-12-29 22:33:46 +01:00
Avuton Olrich d38c09051c Modify version string to post-release version 0.15.8~git 2009-12-27 08:31:47 -08:00
Avuton Olrich b1cc760aa5 mpd version 0.15.7 2009-12-27 08:31:47 -08:00
Max Kellermann d66c055fec dbUtils: return multiple tag values per song
When collecting tag values for the result set, add all of a song's tag
values of the searched type.  This affects the "list" command.
Previously, "list" only considered the first tag value of a song.
2009-12-27 16:49:04 +01:00
Max Kellermann 915d1d0738 decoder_thread: eliminate jitter after seek failure
Don't clear the music pipe when seeking has failed - check the
"seeking" flag instead of "command==SEEK".  Clear the "seeking" flag
in decoder_seek_error().
2009-12-26 02:58:30 +01:00
Max Kellermann 8a6d448aaf decoder/wavpack: allow fine-grained seeking
First multiply the floating point return value of
decoder_seek_where(), then cast to integer.
2009-12-26 02:58:30 +01:00
Max Kellermann 9179f108a5 iso, zip: fixed memory leak in destructor
Free the "context" pointer in the method archive_plugin.close().
2009-12-15 19:57:00 +01:00
Max Kellermann 3411f6cffd archive: close archive when stream is closed
Fixes a memory leak: the "archive" input plugin opens the archive, but
never closes it.  This patch moves the responsibility for doing that
to archive_plugin.open_stream().  This is an slight internal API
change, but it is the simplest and least intrusive fix for the memory
leak.
2009-12-15 19:45:50 +01:00
Max Kellermann 2234d491b7 input/archive: close the archive file on error
Fixed memory leak in error handler.
2009-12-15 19:41:00 +01:00
Max Kellermann f01d7d230b input/file: don't fall back to parent directory
This code has never made any sense, and has broken some of the archive
plugin.
2009-12-15 19:16:28 +01:00
Max Kellermann 5a354a1ed4 mixer: explicitly close all mixers on shutdown
Mixers with the "global" flag set aren't closed automatically when the
output device is closed.  Thus, they might still be open when MPD
shuts down.
2009-12-08 08:47:47 +01:00
Max Kellermann f4b707b4ca mapper: apply filesystem_charset to playlists
This fixes an inconsistency in the stored playlist subsystem: when
obtaining the list of playlists (listplaylist, listplaylistinfo), the
file names in the playlist directory are converted to UTF-8 (according
to filesystem_charset), but when saving or loading playlists, the
filesystem_charset setting was ignored.
2009-12-08 08:33:14 +01:00
Max Kellermann cd69fee0a4 command: verify playlist name in the "rm" command
Call spl_valid_name() in spl_delete().
2009-12-08 08:32:26 +01:00
Max Kellermann 23e46b38ca mapper: fix memory leak when playlist_directory is not set
Don't allocate the file name before the playlist_dir==NULL check.
2009-12-08 08:06:10 +01:00
svitoos 7162fe85ce tag_id3: fix ID3v1 charset conversion
If we define id3v1_encoding, then the tags are not added to the
database.
2009-11-30 17:42:46 +01:00
Max Kellermann 16123f1b8e ffmpeg: don't try to force stereo
The plugin code tried to force libavcodec to supply stereo samples.
That however has never actually worked.  By removing this code, we are
able to play surround files for the first time.
2009-11-30 09:59:05 +01:00
Avuton Olrich d1aee3ae74 Modify version string to post-release version 0.15.7~git 2009-11-18 18:49:25 -08:00
Avuton Olrich 30847e6c77 mpd version 0.15.6 2009-11-18 18:49:25 -08:00
Max Kellermann 97f8e017c4 decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-18 19:55:38 +01:00
Max Kellermann f51ba6464a id3: allow 4 MB RIFF/AIFF tags
Allow RIFF/AIFF ID3 tags up to 4 MB (old limit was 256 kB).  This
might still be too small for some users, and when somebody complains,
we might do something more clever (like streaming the data into
libid3tag?).
2009-11-15 18:44:53 +01:00
Max Kellermann 77b95d08a5 decoder/ffmpeg: align the output buffer
On some platforms, libavcodec wants the output buffer aligned to 16
bytes (because it uses SSE/Altivec internally).  It will segfault when
you don't obey this rule.
2009-11-15 17:39:09 +01:00
Max Kellermann dca4d9cf83 decoder/flac: fixed CUE seeking range check
If flac_container_decode() gets a seek destination which is out of
range, it ignores the SEEK command (never finishes it).  This leads to
MPD lockup, because the player thread waits for completion.
2009-11-11 08:55:55 +01:00
Max Kellermann 68f77e4163 oggflac: rewind stream after FLAC detection
The oggflac plugin has been completely broken for quite a while and
nobody has noticed - maybe we should remove it?
2009-11-11 08:14:37 +01:00
Max Kellermann 93a13b42dd zzip: require libzzip 0.13
We need the function zzip_file_stat().
2009-11-10 21:00:10 +01:00
Max Kellermann 96fcf5e1a5 input/mms: require libmms 0.4
We're using API functions which are not available in 0.3.
2009-11-10 20:57:10 +01:00
Max Kellermann 937b2b1744 sticker: added fallback for sqlite3_prepare_v2()
This function was not present in SQLite < 3.4.
2009-11-10 20:55:29 +01:00
Max Kellermann 8c0680f6b9 input/lastfm: fixed variable name in GLib<2.16 code path
Should be "lastfm_user", not "lastfm_username".
2009-11-10 20:54:17 +01:00
Max Kellermann b242175e18 song_save: increased maximum line length to 32 kB
The line buffer had a fixed size of 5 kB, and was allocated on the
stack.  This was too small for some users.  As a hotfix, we're
increasing the buffer size to 32 kB now, allocated on the heap.  In
MPD 0.16, we'll switch to dynamic allocation.
2009-11-01 15:27:55 +01:00
Max Kellermann 04816a6369 decoder/ffmpeg: convert metadata
Convert the metadata with the libavformat function av_metadata_conv().
This ensures that canonical tag names are provided by libavformat, and
we can remove the "artist" vs "author" workaround.
2009-10-28 22:12:22 +01:00
Max Kellermann d083032236 update: delete ignored symlinks from database
When you disable the "follow_outside_symlinks" or the
"follow_inside_symlinks" setting, the next update should remove the
now-ignored files from the database.
2009-10-27 22:06:28 +01:00
Max Kellermann 1a6ed81193 output_thread: check again if output is open on PAUSE
Basically the same as the 0.15.5 patch "check again if output is open
on CANCEL".  Same race condition, same fix.
2009-10-21 08:07:07 +02:00
Avuton Olrich b2b300b635 Modify version string to post-release version 0.15.6~git 2009-10-18 09:50:17 -07:00
Avuton Olrich 7df1a2c77d mpd version 0.15.5 2009-10-18 09:50:16 -07:00
Max Kellermann d09e19c3dc decoder/flac: fixed two memory leaks in the CUE tag loader
Don't initialize "vc" and "cs" with FLAC__metadata_object_new(); that
value is overwritten by FLAC__metadata_get_tags() and
FLAC__metadata_get_cuesheet().
2009-10-16 17:39:17 +02:00
Max Kellermann 8ae5bc4d79 update: fixed memory leak during container scan
The return value of map_directory_child_fs() must be freed.
2009-10-16 17:38:15 +02:00
Max Kellermann 2c908fde1b output_thread: check again if output is open on CANCEL
When the player thread unpauses, it sends CANCEL to the output thread,
after having checked that the output is still open.  Problem is when
the output thread closes the device before it can process the CANCEL
command - race condition.  This patch adds another "open" check inside
the output thread.
2009-10-16 15:09:22 +02:00
Max Kellermann 6037beabe1 input/curl: fixed endless loop during buffering
When the connection is lost while buffering, the CURL input plugin may
enter an endless loop, because it does not check the EOF condition.
This patch makes fill_buffer() return success only if there's at least
one buffer, which is enough of a check.x
2009-10-13 16:24:28 +02:00
Max Kellermann 9a3f5ff977 riff, aiff: fixed "limited range" gcc warning
On 32 bit systems with large file support enabled (i.e. "sizeof(off_t)
> sizeof(size_t)") gcc emits a warning because a size_t cast to off_t
can never become negative.
2009-10-11 23:15:38 +02:00
Max Kellermann a1d868eb56 decoder_thread: change the fallback decoder name to "mad"
When there is no Content-Type response header, try the "mad" decoder
plugin.  It uesd to be named "mp3", and we forgot to change the
fallback name in decoder_thread.c.
2009-10-11 23:14:16 +02:00
Max Kellermann af92b1c2d8 input/curl: don't abort if a packet has only metadata
When a received chunk of data has only icy-metadata, there was no
usable data left for input_curl_read() to return, and thus it returned
0 bytes.  "0" however is a special value for "end of file" or
"error".  This patch makes input_curl_read() read more data from the
socket, until the read request can be fulfilled (or until there's
really EOF).
2009-10-11 23:13:49 +02:00
Avuton Olrich d6d4de1123 Modify version string to post-release version 0.15.5~git 2009-10-03 05:44:26 -07:00
Avuton Olrich 325e380b8e mpd version 0.15.4 2009-10-03 05:44:26 -07:00
Max Kellermann 65693d057b decoder/ffmpeg: use the "artist" tag if "author" is not present
Usually, we read our "artist" tag from ffmpeg's "author" tag.  In some
cases however (e.g. APE), this tag is named "artist".  This patch
implements a fallback: if no "author" is found, MPD tries to use
"artist".
2009-09-30 15:41:43 +02:00
Max Kellermann b0f9a1454a decoder/faad: skip assertion failure on large ID3 tags
When the ID3 tag in an AAC file is larger than the current buffer, the
function decoder_buffer_consume() aborts.  By using the new function
decoder_buffer_skip() instead, we can safely skip the ID3 tag.
2009-09-30 15:22:47 +02:00
Patrik Weiskircher 803a698f98 output/osx: fix the OS X 10.6 build
Include CoreServices/CoreServices.h.
2009-09-20 23:28:07 +02:00