aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-17 16:45:49 +0100
committerMax Kellermann <max@duempel.org>2008-12-17 16:45:49 +0100
commit13192546a8386d91cac9045e86566906c220f3f6 (patch)
tree5d06c7b386d92f426f48dd5ec5f07aefd72e08d7 /src/player_control.h
parent25c04a97d3bab513134d78153a0fb0c3ac0fd553 (diff)
downloadmpd-13192546a8386d91cac9045e86566906c220f3f6.tar.gz
mpd-13192546a8386d91cac9045e86566906c220f3f6.tar.xz
mpd-13192546a8386d91cac9045e86566906c220f3f6.zip
playlist: clear pc.errored_song on delete
When a (remote) song is deleted from the playlist, there may still be a reference to it in pc.errored_song. Clear this reference.
Diffstat (limited to '')
-rw-r--r--src/player_control.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/player_control.h b/src/player_control.h
index 2ae1fb618..fa228d8b3 100644
--- a/src/player_control.h
+++ b/src/player_control.h
@@ -84,6 +84,14 @@ void pc_init(unsigned int buffered_before_play);
void pc_deinit(void);
+/**
+ * Call this function when the specified song pointer is about to be
+ * invalidated. This makes sure that player_control.errored_song does
+ * not point to an invalid pointer.
+ */
+void
+pc_song_deleted(const struct song *song);
+
void
playerPlay(struct song *song);