# HG changeset patch # User nenolod # Date 1169926805 28800 # Node ID 4e2fc64d95efb5433a55a7db374c0442ce5977a7 # Parent ca5b5523cc2d6c1376c0d35fe500aef53c21555c [svn] - make vfs_buffered_file_new_from_uri declaration const - cope properly with subsong URIs diff -r ca5b5523cc2d -r 4e2fc64d95ef ChangeLog --- a/ChangeLog Sat Jan 27 11:28:14 2007 -0800 +++ b/ChangeLog Sat Jan 27 11:40:05 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-27 19:28:14 +0000 William Pitcock + revision [3868] + - fix an offset error in the vfs_buffered_file wraparound implementation sections + + trunk/src/audacious/vfs_buffered_file.c | 6 ++++++ + 1 file changed, 6 insertions(+) + + 2007-01-27 16:22:15 +0000 Yoshiki Yazawa revision [3866] - make sure tooltip_file != NULL otherwise filepopup may crash in strcmp(). diff -r ca5b5523cc2d -r 4e2fc64d95ef src/audacious/input.c --- a/src/audacious/input.c Sat Jan 27 11:28:14 2007 -0800 +++ b/src/audacious/input.c Sat Jan 27 11:40:05 2007 -0800 @@ -418,11 +418,21 @@ InputPlugin *ip; gchar *filename_proxy; gint ret = 1; - gchar *ext; + gchar *ext, *tmp, *tmp_uri; gboolean use_ext_filter; filename_proxy = g_strdup(filename); - fd = vfs_buffered_file_new_from_uri(filename_proxy); + + /* Some URIs will end in ? to determine the subsong requested. */ + tmp_uri = g_strdup(filename); + + tmp = strrchr(tmp_uri, '?'); + + if (tmp != NULL) + *tmp = '\0'; + + fd = vfs_buffered_file_new_from_uri(tmp_uri); + g_free(tmp_uri); ext = strrchr(filename_proxy, '.') + 1; diff -r ca5b5523cc2d -r 4e2fc64d95ef src/audacious/vfs_buffered_file.c --- a/src/audacious/vfs_buffered_file.c Sat Jan 27 11:28:14 2007 -0800 +++ b/src/audacious/vfs_buffered_file.c Sat Jan 27 11:40:05 2007 -0800 @@ -170,7 +170,7 @@ }; VFSFile * -vfs_buffered_file_new_from_uri(gchar *uri) +vfs_buffered_file_new_from_uri(const gchar *uri) { VFSFile *handle; VFSBufferedFile *fd; diff -r ca5b5523cc2d -r 4e2fc64d95ef src/audacious/vfs_buffered_file.h --- a/src/audacious/vfs_buffered_file.h Sat Jan 27 11:28:14 2007 -0800 +++ b/src/audacious/vfs_buffered_file.h Sat Jan 27 11:40:05 2007 -0800 @@ -50,7 +50,7 @@ * * Return value: A VFSFile handle for the VFSBufferedFile. **/ -VFSFile *vfs_buffered_file_new_from_uri(gchar *uri); +VFSFile *vfs_buffered_file_new_from_uri(const gchar *uri); G_END_DECLS