Merge branch 'v0.18.x'
This commit is contained in:
@@ -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())
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef HAVE_OSX
|
||||
#ifndef __APPLE__
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#else
|
||||
|
Reference in New Issue
Block a user