diff options
author | Max Kellermann <max@duempel.org> | 2015-01-14 19:43:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-01-14 19:44:28 +0100 |
commit | eaf0662b75e8e074dbfe950aa9f408e4ad806bcc (patch) | |
tree | 0af65761fd7c14fe61e4b16a2b9e56f8a32ca79e /src/output | |
parent | 6e8ea2a2cb655f805906a1930b86c20486aef2cf (diff) | |
download | mpd-eaf0662b75e8e074dbfe950aa9f408e4ad806bcc.tar.gz mpd-eaf0662b75e8e074dbfe950aa9f408e4ad806bcc.tar.xz mpd-eaf0662b75e8e074dbfe950aa9f408e4ad806bcc.zip |
fs/io/FileOutputStream: add static method Create()
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/plugins/RecorderOutputPlugin.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/output/plugins/RecorderOutputPlugin.cxx b/src/output/plugins/RecorderOutputPlugin.cxx index f6508e33c..22915e39f 100644 --- a/src/output/plugins/RecorderOutputPlugin.cxx +++ b/src/output/plugins/RecorderOutputPlugin.cxx @@ -167,11 +167,9 @@ RecorderOutput::Open(AudioFormat &audio_format, Error &error) { /* create the output file */ - file = new FileOutputStream(path, error); - if (!file->IsDefined()) { - delete file; + file = FileOutputStream::Create(path, error); + if (file == nullptr) return false; - } /* open the encoder */ |