Index: libmuine/id3-vfs/id3-vfs.c
===================================================================
RCS file: /cvs/gnome/muine/libmuine/id3-vfs/id3-vfs.c,v
retrieving revision 1.2
diff -u -r1.2 id3-vfs.c
--- libmuine/id3-vfs/id3-vfs.c	14 Feb 2004 21:03:19 -0000	1.2
+++ libmuine/id3-vfs/id3-vfs.c	7 Jun 2005 07:24:12 -0000
@@ -481,6 +481,7 @@
   GnomeVFSHandle *iofile = file->iofile;
   GnomeVFSResult res;
   guchar buffer[16384];
+  guchar *big_buffer = 0;
   int is_wave, found, i;
 
   *bitrate = 0;
@@ -513,18 +514,21 @@
       break;
     }
   }
-
-  /* If we haven't found anything, try again with 8 more kB */
+  
+  /* If we haven't found anything, try again with a much bigger buffer */
+  /* (This is mostly in case there's a good-sized image embedded in the tag) */
   if (is_wave == 0 && found == 0)
   {
-    res = gnome_vfs_read (iofile, buffer, sizeof (buffer), &length_read);
+    big_buffer = g_new(guchar, 8388608);
+    
+    res = gnome_vfs_read (iofile, big_buffer, sizeof(guchar)*8388608, &length_read);
 
     if( res != GNOME_VFS_OK || length_read < 512 )
       goto bitdone;
 
     for (i = 0; i + 4 < length_read; i++)
     {
-      if (mp3_bitrate_parse_header (buffer+i, length_read - i, bitrate, samplerate, time, version, vbr, channels))
+      if (mp3_bitrate_parse_header (big_buffer+i, length_read - i, bitrate, samplerate, time, version, vbr, channels))
       {
 	      found = 1;
 	      break;
@@ -533,6 +537,8 @@
   }
 
 bitdone:
+  g_free(big_buffer);
+
   if (gnome_vfs_seek(iofile, GNOME_VFS_SEEK_START, save_position) != GNOME_VFS_OK)
     return 0;
 
