diff options
author | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:53 +0100 |
commit | 8fe03b8bcef9f5a3a822055a3c4ab65cfe1baedb (patch) | |
tree | ddb22a695b4a2643cbf77e699e2d5a5f0cbcd2ab /src/decoder_control.c | |
parent | c01aa53e6a972cd83e866b6b2e390449f2a59658 (diff) | |
download | mpd-8fe03b8bcef9f5a3a822055a3c4ab65cfe1baedb.tar.gz mpd-8fe03b8bcef9f5a3a822055a3c4ab65cfe1baedb.tar.xz mpd-8fe03b8bcef9f5a3a822055a3c4ab65cfe1baedb.zip |
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.
Diffstat (limited to 'src/decoder_control.c')
-rw-r--r-- | src/decoder_control.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); +} |