aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jansen <mithi@mithi.net>2010-09-22 22:20:50 +0200
committerMax Kellermann <max@duempel.org>2010-09-23 20:39:13 +0200
commit54294366d5fe47aba687fc791967596e31a26864 (patch)
treee718b5ea84975062c503bbf0fc142429201947f4
parent4a7abc9d44206296587a9e4302e0e1a273aef6e9 (diff)
downloadmpd-54294366d5fe47aba687fc791967596e31a26864.tar.gz
mpd-54294366d5fe47aba687fc791967596e31a26864.tar.xz
mpd-54294366d5fe47aba687fc791967596e31a26864.zip
rewind_input_plugin: Update MIME not only once
The assumption that MIME type is set only once is not valid with CURL, as URL redirections may update the MIME type. This fixes bug #3044.
Diffstat (limited to '')
-rw-r--r--NEWS2
-rw-r--r--src/input/rewind_input_plugin.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 310174a1c..2b6bb2eb3 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ ver 0.15.13 (2010/??/??)
* output_thread: fix race condition after CANCEL command
* output:
- httpd: fix random data in stream title
+* input:
+ - rewind: update MIME not only once
ver 0.15.12 (2010/07/20)
diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c
index 0a874a29c..335ccf7e1 100644
--- a/src/input/rewind_input_plugin.c
+++ b/src/input/rewind_input_plugin.c
@@ -86,10 +86,11 @@ copy_attributes(struct input_stream *dest)
dest->size = src->size;
dest->offset = src->offset;
- if (dest->mime == NULL && src->mime != NULL)
- /* this is set only once, and the duplicated pointer
- is freed by input_stream_close() */
+ if (src->mime != NULL) {
+ if (dest->mime != NULL)
+ g_free(dest->mime);
dest->mime = g_strdup(src->mime);
+ }
}
static void