changeset 481:8b7576001358 trunk

[svn] - use VFSVorbisFile class for tuple builder
author nenolod
date Sun, 21 Jan 2007 03:52:04 -0800
parents ed8782827a59
children 416d9e2d075e
files ChangeLog src/vorbis/vorbis.c
diffstat 2 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 21 03:32:15 2007 -0800
+++ b/ChangeLog	Sun Jan 21 03:52:04 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-21 11:32:15 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1046]
+  - touch .depend after blanking it out
+  
+  trunk/mk/objective.mk |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2007-01-21 11:01:06 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1044]
   - remove .depend on make clean
--- a/src/vorbis/vorbis.c	Sun Jan 21 03:32:15 2007 -0800
+++ b/src/vorbis/vorbis.c	Sun Jan 21 03:52:04 2007 -0800
@@ -819,20 +819,20 @@
     OggVorbis_File vfile;          /* avoid thread interaction */
     TitleInput *tuple = NULL;
     gboolean is_stream = FALSE;
+    VFSVorbisFile *fd = NULL;
 
-    if (strncasecmp(filename, "http://", 7)) {
-        if ((stream = vfs_fopen(filename, "r")) == NULL)
-            return NULL;
-    }
-    else
-        is_stream = TRUE;
+    if ((stream = vfs_fopen(filename, "r")) == NULL)
+        return NULL;
+
+    fd = g_new0(VFSVorbisFile, 1);
+    fd->fd = stream;
 
     /*
      * The open function performs full stream detection and
      * machine initialization.  If it returns zero, the stream
      * *is* Vorbis and we're fully ready to decode.
      */
-    if (ov_open_callbacks(stream, &vfile, NULL, 0, vorbis_callbacks) < 0) {
+    if (ov_open_callbacks(fd, &vfile, NULL, 0, vorbis_callbacks) < 0) {
         if (is_stream == FALSE)
             vfs_fclose(stream);
         return NULL;