summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cddb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index be6ac9269b..ada943757f 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -439,6 +439,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
mp_msg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_InvalidXMCDDatabaseReturned);
return -1;
}
+ ptr = strdup(ptr);
// Ok found the beginning of the file
// look for the end
ptr2 = strstr(ptr, "\r\n.\r\n");
@@ -458,9 +459,6 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
cddb_data->xmcd_file = ptr;
cddb_data->xmcd_file_size = ptr2-ptr;
cddb_data->xmcd_file[cddb_data->xmcd_file_size] = '\0';
- // Avoid the http_free function to free the xmcd file...save a mempcy...
- http_hdr->body = NULL;
- http_hdr->body_size = 0;
return cddb_write_cache(cddb_data);
default:
mp_msg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);