# HG changeset patch # User reimar # Date 1200761341 0 # Node ID 15c5da485a77a69112c2a8995e1bdca1aea920cd # Parent 1d16b891d440fb1725148144ec74c0f867a0e402 Remove a broken and useless hack to avoid a memcpy diff -r 1d16b891d440 -r 15c5da485a77 stream/stream_cddb.c --- a/stream/stream_cddb.c Sat Jan 19 16:41:35 2008 +0000 +++ b/stream/stream_cddb.c Sat Jan 19 16:49:01 2008 +0000 @@ -439,6 +439,7 @@ 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_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);