From 8549ccfd8c24c5666435ac4dd00ba3c7d14e0351 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 20:27:24 +0100 Subject: playlist/CloseSongEnumerator: new wrapper class Simplifies a lot of code, because we don't need to return both the SongEnumerator and the InputStream. --- src/playlist/PlaylistRegistry.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/playlist/PlaylistRegistry.cxx') 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(); -- cgit v1.2.3