aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-27 14:34:51 +0100
committerMax Kellermann <max@duempel.org>2008-12-27 14:34:51 +0100
commitcc3b6c2f5b4e7331888cdbb0aa53852d6492336f (patch)
tree3f0bef567615e928d6a069ddef3ddcc7ae5c3070 /src/decoder
parent0fe0425dee555027c94a39ca0bca5bac947f4702 (diff)
downloadmpd-cc3b6c2f5b4e7331888cdbb0aa53852d6492336f.tar.gz
mpd-cc3b6c2f5b4e7331888cdbb0aa53852d6492336f.tar.xz
mpd-cc3b6c2f5b4e7331888cdbb0aa53852d6492336f.zip
audiofile: don't close onput stream in libaudiofile destroy()
The input_stream object should only be closed by the MPD core (i.e. decoder_thread.c / decoder_run()). A decoder plugin which attempts to close it will result in a segmentation fault.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/audiofile_plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/decoder/audiofile_plugin.c b/src/decoder/audiofile_plugin.c
index c4c72ea42..2445887df 100644
--- a/src/decoder/audiofile_plugin.c
+++ b/src/decoder/audiofile_plugin.c
@@ -22,6 +22,7 @@
#include <audiofile.h>
#include <af_vfs.h>
+#include <assert.h>
#include <glib.h>
#undef G_LOG_DOMAIN
@@ -68,9 +69,9 @@ audiofile_file_tell(AFvirtualfile *vfile)
static void
audiofile_file_destroy(AFvirtualfile *vfile)
{
- struct input_stream *is = (struct input_stream *) vfile->closure;
+ assert(vfile->closure != NULL);
+
vfile->closure = NULL;
- input_stream_close(is);
}
static long