aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DecoderThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 18:52:19 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 18:52:19 +0100
commit6b421cc354cb0c297fcf99d7824b99b61caec99d (patch)
treee41f9fd76e3850da2716ab3dfd4fa08025f351f3 /src/decoder/DecoderThread.cxx
parent37ec29b225095e9c02b974134e056f8ba1a8678c (diff)
downloadmpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.gz
mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.xz
mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.zip
DecoderPlugin: pass Path instance to file_decode() and scan_file()
Diffstat (limited to 'src/decoder/DecoderThread.cxx')
-rw-r--r--src/decoder/DecoderThread.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx
index 4199b4269..37b45bd24 100644
--- a/src/decoder/DecoderThread.cxx
+++ b/src/decoder/DecoderThread.cxx
@@ -143,13 +143,13 @@ decoder_stream_decode(const DecoderPlugin &plugin,
static bool
decoder_file_decode(const DecoderPlugin &plugin,
- Decoder &decoder, const char *path)
+ Decoder &decoder, Path path)
{
assert(plugin.file_decode != nullptr);
assert(decoder.stream_tag == nullptr);
assert(decoder.decoder_tag == nullptr);
- assert(path != nullptr);
- assert(PathTraitsFS::IsAbsolute(path));
+ assert(!path.IsNull());
+ assert(path.IsAbsolute());
assert(decoder.dc.state == DecoderState::START);
FormatDebug(decoder_thread_domain, "probing plugin %s", plugin.name);
@@ -300,7 +300,7 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix,
if (plugin.file_decode != nullptr) {
dc.Lock();
- if (decoder_file_decode(plugin, decoder, path_fs.c_str()))
+ if (decoder_file_decode(plugin, decoder, path_fs))
return true;
dc.Unlock();