diff options
author | Max Kellermann <max@duempel.org> | 2013-12-14 12:37:16 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-14 12:37:16 +0100 |
commit | c7b1038a9de21d73a229ff68b58daa1824bfd643 (patch) | |
tree | c70ca2e91daf69ca23bb82d80341302731be98a1 /src | |
parent | d43aa1298728f856d3d3a29477a91b79633022fe (diff) | |
parent | c170fed6f9a747bfe9e4e53a85ebc2e92a70bab6 (diff) | |
download | mpd-c7b1038a9de21d73a229ff68b58daa1824bfd643.tar.gz mpd-c7b1038a9de21d73a229ff68b58daa1824bfd643.tar.xz mpd-c7b1038a9de21d73a229ff68b58daa1824bfd643.zip |
Merge branch 'v0.18.x'
Diffstat (limited to '')
-rw-r--r-- | src/SongUpdate.cxx | 3 | ||||
-rw-r--r-- | src/TagFile.hxx | 3 | ||||
-rw-r--r-- | src/decoder/FfmpegDecoderPlugin.cxx | 7 | ||||
-rw-r--r-- | src/input/CdioParanoiaInputPlugin.cxx | 5 | ||||
-rw-r--r-- | src/mixer/AlsaMixerPlugin.cxx | 3 | ||||
-rw-r--r-- | src/output/OSXOutputPlugin.cxx | 6 | ||||
-rw-r--r-- | src/output/OpenALOutputPlugin.cxx | 2 |
7 files changed, 17 insertions, 12 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index b4a9edc1a..6e5e37a2b 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -89,8 +89,7 @@ Song::UpdateFile() TagBuilder tag_builder; if (!tag_file_scan(path_fs, - &full_tag_handler, &tag_builder) || - !tag_builder.IsDefined()) + &full_tag_handler, &tag_builder)) return false; if (tag_builder.IsEmpty()) diff --git a/src/TagFile.hxx b/src/TagFile.hxx index 90d21dc0f..d1dbb3e46 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -28,6 +28,9 @@ struct tag_handler; /** * Scan the tags of a song file. Invokes matching decoder plugins, * but does not invoke the special "APE" and "ID3" scanners. + * + * @return true if the file was recognized (even if no metadata was + * found) */ bool tag_file_scan(Path path, diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index bef74e367..a14b04510 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -119,8 +119,7 @@ mpd_ffmpeg_stream_seek(void *opaque, int64_t pos, int whence) if (whence == AVSEEK_SIZE) return stream->input.size; - Error error; - if (!stream->input.LockSeek(pos, whence, error)) + if (!stream->input.LockSeek(pos, whence, IgnoreError())) return -1; return stream->input.offset; @@ -341,11 +340,9 @@ ffmpeg_probe(Decoder *decoder, InputStream &is) PADDING = 16, }; - Error error; - unsigned char buffer[BUFFER_SIZE]; size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE); - if (nbytes <= PADDING || !is.LockRewind(error)) + if (nbytes <= PADDING || !is.LockRewind(IgnoreError())) return nullptr; /* some ffmpeg parsers (e.g. ac3_parser.c) read a few bytes diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx index de699ea3a..73fb8acdd 100644 --- a/src/input/CdioParanoiaInputPlugin.cxx +++ b/src/input/CdioParanoiaInputPlugin.cxx @@ -42,7 +42,12 @@ #include <glib.h> #include <assert.h> +#ifdef HAVE_CDIO_PARANOIA_PARANOIA_H +#include <cdio/parannoia/paranoia.h> +#else #include <cdio/paranoia.h> +#endif + #include <cdio/cd_types.h> struct CdioParanoiaInputStream { diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx index 7defdd7be..b81ca4246 100644 --- a/src/mixer/AlsaMixerPlugin.cxx +++ b/src/mixer/AlsaMixerPlugin.cxx @@ -24,6 +24,7 @@ #include "Main.hxx" #include "event/MultiSocketMonitor.hxx" #include "event/Loop.hxx" +#include "event/Call.hxx" #include "util/ASCII.hxx" #include "util/ReusableArray.hxx" #include "util/Error.hxx" @@ -46,7 +47,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor { public: AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer) :MultiSocketMonitor(_loop), mixer(_mixer) { - _loop.AddCall([this](){ InvalidateSockets(); }); + BlockingCall(_loop, [this](){ InvalidateSockets(); }); } private: diff --git a/src/output/OSXOutputPlugin.cxx b/src/output/OSXOutputPlugin.cxx index 7debe6ab2..97ebae056 100644 --- a/src/output/OSXOutputPlugin.cxx +++ b/src/output/OSXOutputPlugin.cxx @@ -363,9 +363,9 @@ osx_output_open(struct audio_output *ao, AudioFormat &audio_format, OSStatus status = AudioUnitInitialize(od->au); if (status != noErr) { - error.Set(osx_output_domain, status, - "Unable to initialize OS X audio unit: %s", - GetMacOSStatusCommentString(status)); + error.Format(osx_output_domain, status, + "Unable to initialize OS X audio unit: %s", + GetMacOSStatusCommentString(status)); return false; } diff --git a/src/output/OpenALOutputPlugin.cxx b/src/output/OpenALOutputPlugin.cxx index e753b206f..268cf17cc 100644 --- a/src/output/OpenALOutputPlugin.cxx +++ b/src/output/OpenALOutputPlugin.cxx @@ -25,7 +25,7 @@ #include <glib.h> -#ifndef HAVE_OSX +#ifndef __APPLE__ #include <AL/al.h> #include <AL/alc.h> #else |