aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/PlaylistRegistry.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 20:27:24 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 20:27:24 +0100
commit8549ccfd8c24c5666435ac4dd00ba3c7d14e0351 (patch)
tree3b7820e956b3b494dff1a21be97baa311f1ff1cb /src/playlist/PlaylistRegistry.cxx
parentffd16b55a69a01b906805752acc11e26491138bc (diff)
downloadmpd-8549ccfd8c24c5666435ac4dd00ba3c7d14e0351.tar.gz
mpd-8549ccfd8c24c5666435ac4dd00ba3c7d14e0351.tar.xz
mpd-8549ccfd8c24c5666435ac4dd00ba3c7d14e0351.zip
playlist/CloseSongEnumerator: new wrapper class
Simplifies a lot of code, because we don't need to return both the SongEnumerator and the InputStream.
Diffstat (limited to 'src/playlist/PlaylistRegistry.cxx')
-rw-r--r--src/playlist/PlaylistRegistry.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx
index 55064849b..6b594e3c5 100644
--- a/src/playlist/PlaylistRegistry.cxx
+++ b/src/playlist/PlaylistRegistry.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "PlaylistRegistry.hxx"
#include "PlaylistPlugin.hxx"
+#include "CloseSongEnumerator.hxx"
#include "plugins/ExtM3uPlaylistPlugin.hxx"
#include "plugins/M3uPlaylistPlugin.hxx"
#include "plugins/XspfPlaylistPlugin.hxx"
@@ -279,8 +280,7 @@ playlist_suffix_supported(const char *suffix)
}
SongEnumerator *
-playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond,
- InputStream **is_r)
+playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond)
{
const char *suffix;
@@ -301,7 +301,7 @@ playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond,
auto playlist = playlist_list_open_stream_suffix(*is, suffix);
if (playlist != nullptr)
- *is_r = is;
+ playlist = new CloseSongEnumerator(playlist, is);
else
is->Close();