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.
This commit is contained in:
parent
0fe0425dee
commit
cc3b6c2f5b
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <audiofile.h>
|
#include <audiofile.h>
|
||||||
#include <af_vfs.h>
|
#include <af_vfs.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#undef G_LOG_DOMAIN
|
#undef G_LOG_DOMAIN
|
||||||
@ -68,9 +69,9 @@ audiofile_file_tell(AFvirtualfile *vfile)
|
|||||||
static void
|
static void
|
||||||
audiofile_file_destroy(AFvirtualfile *vfile)
|
audiofile_file_destroy(AFvirtualfile *vfile)
|
||||||
{
|
{
|
||||||
struct input_stream *is = (struct input_stream *) vfile->closure;
|
assert(vfile->closure != NULL);
|
||||||
|
|
||||||
vfile->closure = NULL;
|
vfile->closure = NULL;
|
||||||
input_stream_close(is);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static long
|
static long
|
||||||
|
Loading…
Reference in New Issue
Block a user