From 15d29da43baa1c6285ce559547efb62937cfcf93 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 7 Jan 2015 18:43:45 +0100 Subject: [PATCH] output/oss: add "device" parameter to constructor --- src/output/plugins/OssOutputPlugin.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index f7b491bed..366f7fa56 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -80,9 +80,9 @@ struct OssOutput { */ int oss_format; - OssOutput() + OssOutput(const char *_device=nullptr) :base(oss_output_plugin), - fd(-1), device(nullptr) {} + fd(-1), device(_device) {} bool Initialize(const config_param ¶m, Error &error_r) { return base.Configure(param, error_r); @@ -193,13 +193,12 @@ oss_open_default(Error &error) for (int i = ARRAY_SIZE(default_devices); --i >= 0; ) { ret[i] = oss_stat_device(default_devices[i], &err[i]); if (ret[i] == OSS_STAT_NO_ERROR) { - OssOutput *od = new OssOutput(); + OssOutput *od = new OssOutput(default_devices[i]); if (!od->Initialize(empty, error)) { delete od; return NULL; } - od->device = default_devices[i]; return od; } }