aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DecoderThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-11 15:34:48 +0200
committerMax Kellermann <max@duempel.org>2014-05-11 15:34:48 +0200
commit6773adc7716eea7656c4590b54f7c99840ff4087 (patch)
treeb71756798018721f3aa472ce1b81aa14e84239b8 /src/decoder/DecoderThread.cxx
parentee2afb35dd715d9f34a938cd54ed02a3c0091a78 (diff)
downloadmpd-6773adc7716eea7656c4590b54f7c99840ff4087.tar.gz
mpd-6773adc7716eea7656c4590b54f7c99840ff4087.tar.xz
mpd-6773adc7716eea7656c4590b54f7c99840ff4087.zip
InputStream: convert to class
Diffstat (limited to 'src/decoder/DecoderThread.cxx')
-rw-r--r--src/decoder/DecoderThread.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx
index 37b45bd24..4dd3c215c 100644
--- a/src/decoder/DecoderThread.cxx
+++ b/src/decoder/DecoderThread.cxx
@@ -87,7 +87,7 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri)
dc.Lock();
is->Update();
- while (!is->ready &&
+ while (!is->IsReady() &&
dc.command != DecoderCommand::STOP) {
dc.Wait();
@@ -114,7 +114,7 @@ decoder_stream_decode(const DecoderPlugin &plugin,
assert(plugin.stream_decode != nullptr);
assert(decoder.stream_tag == nullptr);
assert(decoder.decoder_tag == nullptr);
- assert(input_stream.ready);
+ assert(input_stream.IsReady());
assert(decoder.dc.state == DecoderState::START);
FormatDebug(decoder_thread_domain, "probing plugin %s", plugin.name);
@@ -179,7 +179,8 @@ decoder_check_plugin_mime(const DecoderPlugin &plugin, const InputStream &is)
{
assert(plugin.stream_decode != nullptr);
- return !is.mime.empty() && plugin.SupportsMimeType(is.mime.c_str());
+ const char *mime_type = is.GetMimeType();
+ return mime_type != nullptr && plugin.SupportsMimeType(mime_type);
}
gcc_pure