mirror of
https://github.com/mpv-player/mpv
synced 2025-04-17 04:40:09 +00:00
Remove a broken and useless hack to avoid a memcpy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25806 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
57f7b01ee4
commit
5efa59daeb
@ -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);
|
mp_msg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_InvalidXMCDDatabaseReturned);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
ptr = strdup(ptr);
|
||||||
// Ok found the beginning of the file
|
// Ok found the beginning of the file
|
||||||
// look for the end
|
// look for the end
|
||||||
ptr2 = strstr(ptr, "\r\n.\r\n");
|
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 = ptr;
|
||||||
cddb_data->xmcd_file_size = ptr2-ptr;
|
cddb_data->xmcd_file_size = ptr2-ptr;
|
||||||
cddb_data->xmcd_file[cddb_data->xmcd_file_size] = '\0';
|
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);
|
return cddb_write_cache(cddb_data);
|
||||||
default:
|
default:
|
||||||
mp_msg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
|
mp_msg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user