changeset 221:8932ad49b51f trunk

[svn] Fixed crash when a stream is in the playlist.
author js
date Sun, 05 Nov 2006 10:24:30 -0800
parents 1e2d575fd2e7
children eda9699e490e
files ChangeLog src/mpg123/mpg123.c
diffstat 2 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Nov 05 02:21:22 2006 -0800
+++ b/ChangeLog	Sun Nov 05 10:24:30 2006 -0800
@@ -1,3 +1,14 @@
+2006-11-05 10:21:22 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [440]
+  - allow seeking in http streams that define a content length.
+  
+  trunk/src/mpg123/common.c |   38 +++++++++++++++++++++++++++-----------
+  trunk/src/mpg123/http.c   |   22 +++++++++++++++++-----
+  trunk/src/mpg123/mpg123.c |    8 ++++----
+  trunk/src/mpg123/mpg123.h |   11 ++++-------
+  4 files changed, 52 insertions(+), 27 deletions(-)
+
+
 2006-11-05 09:07:34 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [438]
   - fix a typo which preventes compile
--- a/src/mpg123/mpg123.c	Sun Nov 05 02:21:22 2006 -0800
+++ b/src/mpg123/mpg123.c	Sun Nov 05 10:24:30 2006 -0800
@@ -349,18 +349,12 @@
 {
     gchar *ext = strrchr(filename, '.');
 
-    if (CHECK_STREAM(filename) &&
-        (ext && strncasecmp(ext, ".ogg", 4)) &&
-        (ext && strncasecmp(ext, ".flac", 5)))
-	return TRUE;
-    else if (mpgdec_detect_by_content(filename))
-        return TRUE;
-#if 0
-    else if (ext && (!strncasecmp(ext, ".mp3", 4)
+    if (ext && (!strncasecmp(ext, ".mp3", 4)
 	|| !strncasecmp(ext, ".mp2", 4)
 	|| !strncasecmp(ext, ".mpg", 4)))
         return TRUE;
-#endif
+    else if (mpgdec_detect_by_content(filename))
+        return TRUE;
 
     return FALSE;
 }