Mercurial > audlegacy-plugins
changeset 223:12346b051297 trunk
[svn] - fix tuple breakage
author | nenolod |
---|---|
date | Sun, 05 Nov 2006 12:36:34 -0800 |
parents | eda9699e490e |
children | f6bdf10fe48c |
files | ChangeLog src/mpg123/mpg123.c src/mpg123/mpg123.h |
diffstat | 3 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Nov 05 12:31:33 2006 -0800 +++ b/ChangeLog Sun Nov 05 12:36:34 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-05 20:31:33 +0000 William Pitcock <nenolod@nenolod.net> + revision [444] + - fix magic detection + + trunk/src/mpg123/mpg123.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + + 2006-11-05 18:24:30 +0000 Jonathan Schleifer <js@h3c.de> revision [442] Fixed crash when a stream is in the playlist.
--- a/src/mpg123/mpg123.c Sun Nov 05 12:31:33 2006 -0800 +++ b/src/mpg123/mpg123.c Sun Nov 05 12:36:34 2006 -0800 @@ -349,11 +349,7 @@ { gchar *ext = strrchr(filename, '.'); - if ((!strncasecmp(filename, "http://", 7) -#ifdef HAVE_NEMESI - || !strncasecmp(filename, "rtsp://", 7) -#endif - ) && + if (CHECK_STREAM_URI(filename) && (ext && strncasecmp(ext, ".ogg", 4)) && (ext && strncasecmp(ext, ".flac", 5))) return TRUE; @@ -630,7 +626,7 @@ /* * TODO: Getting song info from http streams. */ - if (CHECK_STREAM(filename)) + if (CHECK_STREAM_URI(filename)) return; if ((tuple = get_song_tuple(filename)) != NULL) { @@ -768,7 +764,7 @@ mpgdec_length = mpgdec_info->num_frames * mpgdec_info->tpf * 1000; - if (mpgdec_info->filesize == 0) { + if (mpgdec_info->filesize != 0) { TitleInput *tuple = NULL; if (!mpgdec_title) {
--- a/src/mpg123/mpg123.h Sun Nov 05 12:31:33 2006 -0800 +++ b/src/mpg123/mpg123.h Sun Nov 05 12:36:34 2006 -0800 @@ -91,7 +91,10 @@ int mpgdec_rtsp_open(char *url); int mpgdec_rtsp_read(gpointer data, gsize length); void mpgdec_rtsp_close (void); +#define CHECK_STREAM_URI(filename) (!g_strncasecmp(filename, "http://", 7) \ + || !g_strncasecmp(filename, "rtsp://", 7)) #else +#define CHECK_STREAM_URI(filename) (!g_strncasecmp(filename, "http://", 7)) #endif #define CHECK_STREAM(var_is_deprecated) (mpgdec_info->filesize == 0)