Mercurial > audlegacy
comparison src/audacious/input.c @ 2430:4e2fc64d95ef trunk
[svn] - make vfs_buffered_file_new_from_uri declaration const
- cope properly with subsong URIs
| author | nenolod |
|---|---|
| date | Sat, 27 Jan 2007 11:40:05 -0800 |
| parents | 64948ea58c53 |
| children | f346d30bf5ab |
comparison
equal
deleted
inserted
replaced
| 2429:ca5b5523cc2d | 2430:4e2fc64d95ef |
|---|---|
| 416 VFSFile *fd; | 416 VFSFile *fd; |
| 417 GList *node; | 417 GList *node; |
| 418 InputPlugin *ip; | 418 InputPlugin *ip; |
| 419 gchar *filename_proxy; | 419 gchar *filename_proxy; |
| 420 gint ret = 1; | 420 gint ret = 1; |
| 421 gchar *ext; | 421 gchar *ext, *tmp, *tmp_uri; |
| 422 gboolean use_ext_filter; | 422 gboolean use_ext_filter; |
| 423 | 423 |
| 424 filename_proxy = g_strdup(filename); | 424 filename_proxy = g_strdup(filename); |
| 425 fd = vfs_buffered_file_new_from_uri(filename_proxy); | 425 |
| 426 /* Some URIs will end in ?<subsong> to determine the subsong requested. */ | |
| 427 tmp_uri = g_strdup(filename); | |
| 428 | |
| 429 tmp = strrchr(tmp_uri, '?'); | |
| 430 | |
| 431 if (tmp != NULL) | |
| 432 *tmp = '\0'; | |
| 433 | |
| 434 fd = vfs_buffered_file_new_from_uri(tmp_uri); | |
| 435 g_free(tmp_uri); | |
| 426 | 436 |
| 427 ext = strrchr(filename_proxy, '.') + 1; | 437 ext = strrchr(filename_proxy, '.') + 1; |
| 428 | 438 |
| 429 use_ext_filter = (fd != NULL && (!g_strncasecmp(filename, "/", 1) || !g_strncasecmp(filename, "file://", 7))) ? TRUE : FALSE; | 439 use_ext_filter = (fd != NULL && (!g_strncasecmp(filename, "/", 1) || !g_strncasecmp(filename, "file://", 7))) ? TRUE : FALSE; |
| 430 | 440 |
