diff options
author | Max Kellermann <max@duempel.org> | 2013-12-29 18:08:49 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-29 18:08:49 +0100 |
commit | aeb2baa495776d9fc06e63f91167c40c334303c8 (patch) | |
tree | 4bbd926c1f19a64a1f3fc5b580d0d68bd3aabca3 /test/run_input.cxx | |
parent | ea9aff1d3f9f68eb5ae9e5f2bd67d283b8c0f47e (diff) | |
download | mpd-aeb2baa495776d9fc06e63f91167c40c334303c8.tar.gz mpd-aeb2baa495776d9fc06e63f91167c40c334303c8.tar.xz mpd-aeb2baa495776d9fc06e63f91167c40c334303c8.zip |
InputStream: add static method OpenReady()
Merge some duplicate code.
Diffstat (limited to '')
-rw-r--r-- | test/run_input.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/test/run_input.cxx b/test/run_input.cxx index fcf4107c4..0c1ba1d36 100644 --- a/test/run_input.cxx +++ b/test/run_input.cxx @@ -50,16 +50,6 @@ dump_input_stream(InputStream *is) is->Lock(); - /* wait until the stream becomes ready */ - - is->WaitReady(); - - if (!is->Check(error)) { - LogError(error); - is->Unlock(); - return EXIT_FAILURE; - } - /* print meta data */ if (!is->mime.empty()) @@ -139,7 +129,7 @@ int main(int argc, char **argv) Mutex mutex; Cond cond; - is = InputStream::Open(argv[1], mutex, cond, error); + is = InputStream::OpenReady(argv[1], mutex, cond, error); if (is != NULL) { ret = dump_input_stream(is); is->Close(); |