From 8fe03b8bcef9f5a3a822055a3c4ab65cfe1baedb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Dec 2008 19:48:53 +0100 Subject: decoder: terminate decoder thread before MPD cleanup When MPD exits, it should manually free all resources in use, to allow easy memory leak debugging. Make the decoder thread terminate during that. --- src/decoder_control.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/decoder_control.c') diff --git a/src/decoder_control.c b/src/decoder_control.c index efc8ac797..b934d516f 100644 --- a/src/decoder_control.c +++ b/src/decoder_control.c @@ -100,3 +100,10 @@ dc_seek(struct notify *notify, double where) return true; } + +void +dc_quit(struct notify *notify) +{ + dc.quit = true; + dc_command(notify, DECODE_COMMAND_STOP); +} -- cgit v1.2.3