summaryrefslogtreecommitdiff
path: root/plugins/mpgmad
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-08 12:22:39 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-08 12:22:39 +0100
commit16f075f95d55466856cf7f3fdea2c503b2fcd7cf (patch)
treead8c457b89cd4b112b4720f186af2a26c6a037ca /plugins/mpgmad
parent9743e5efa30faa3eedaadc534d821a29ba41290e (diff)
now it's possible to interrupt hanging file operations (e.g. slow http)
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r--plugins/mpgmad/mpgmad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 8e54b6c8..763b7fb1 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -470,7 +470,7 @@ cmp3_scan_stream (buffer_t *buffer, int sample) {
static int
cmp3_init (DB_playItem_t *it) {
memset (&buffer, 0, sizeof (buffer));
- buffer.file = deadbeef->fopen (it->fname);
+ buffer.file = plugin.info.file = deadbeef->fopen (it->fname);
if (!buffer.file) {
return -1;
}
@@ -783,6 +783,7 @@ cmp3_decode_float32 (void) {
static void
cmp3_free (void) {
+ plugin.info.file = NULL;
if (buffer.file) {
deadbeef->fclose (buffer.file);
buffer.file = NULL;