diff options
author | Max Kellermann <max@duempel.org> | 2014-05-22 11:17:11 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-05-22 11:17:11 +0200 |
commit | 426e0105a65d278f232e941b7fe659fe4bf34b38 (patch) | |
tree | 5d4997de22432233f9502b79c00d2b5de334184f | |
parent | 18f39aa01216844ad37bbee59020c984fbdc308a (diff) | |
download | mpd-426e0105a65d278f232e941b7fe659fe4bf34b38.tar.gz mpd-426e0105a65d278f232e941b7fe659fe4bf34b38.tar.xz mpd-426e0105a65d278f232e941b7fe659fe4bf34b38.zip |
test/run_decoder: move the "uri" attribute out of struct Decoder
Diffstat (limited to '')
-rw-r--r-- | test/run_decoder.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index 18692ac62..6b04b859c 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -40,8 +40,6 @@ #include <stdio.h> struct Decoder { - const char *uri; - bool initialized; }; @@ -173,16 +171,14 @@ decoder_mixramp(gcc_unused Decoder &decoder, gcc_unused MixRampInfo &&mix_ramp) int main(int argc, char **argv) { - const char *decoder_name; - if (argc != 3) { fprintf(stderr, "Usage: run_decoder DECODER URI >OUT\n"); return EXIT_FAILURE; } Decoder decoder; - decoder_name = argv[1]; - decoder.uri = argv[2]; + const char *const decoder_name = argv[1]; + const char *const uri = argv[2]; #ifdef HAVE_GLIB #if !GLIB_CHECK_VERSION(2,32,0) @@ -210,13 +206,13 @@ int main(int argc, char **argv) decoder.initialized = false; if (plugin->file_decode != nullptr) { - plugin->FileDecode(decoder, Path::FromFS(decoder.uri)); + plugin->FileDecode(decoder, Path::FromFS(uri)); } else if (plugin->stream_decode != nullptr) { Mutex mutex; Cond cond; InputStream *is = - InputStream::OpenReady(decoder.uri, mutex, cond, error); + InputStream::OpenReady(uri, mutex, cond, error); if (is == NULL) { if (error.IsDefined()) LogError(error); |