aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_queue.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 23:28:19 +0200
committerMax Kellermann <max@duempel.org>2012-08-16 00:04:14 +0200
commit3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (patch)
tree3313a43df3f120b74166749fdd75b07fa89846ba /src/playlist_queue.c
parentf45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (diff)
downloadmpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.gz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.xz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.zip
DatabasePlugin: add method ReturnSong()
Allow the plugin to allocate the GetSong() return value.
Diffstat (limited to 'src/playlist_queue.c')
-rw-r--r--src/playlist_queue.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/playlist_queue.c b/src/playlist_queue.c
index aada94984..8eb535dbd 100644
--- a/src/playlist_queue.c
+++ b/src/playlist_queue.c
@@ -41,8 +41,7 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source,
++i) {
if (i < start_index) {
/* skip songs before the start index */
- if (!song_in_database(song))
- song_free(song);
+ song_free(song);
continue;
}
@@ -51,9 +50,8 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source,
continue;
result = playlist_append_song(dest, pc, song, NULL);
+ song_free(song);
if (result != PLAYLIST_RESULT_SUCCESS) {
- if (!song_in_database(song))
- song_free(song);
g_free(base_uri);
return result;
}