 +                ogg_stream_clear(&kst);
 +                kate_init_state = kis_sync;
 +            }
-+            else if (!vorbis_cfg.kate_all_streams && strcmp(k.ki->category, "lyrics")) {
++            else {
++              if (ogg_stream_packetout(&kst, &op) > 0) {
++                kate_packet kp;
++                kate_packet_wrap(&kp, op.bytes, op.packet);
++                ret = kate_high_decode_packetin(&k, &kp, NULL);
++                if (ret < 0) {
 +#ifdef DEBUG
-+                g_message("Kate stream is not lyrics (%s): ignoring\n", k.ki->category);
-+#endif
++                    g_message("kate_high_decode_packetin failed: %d\n", ret);
++#endif
++                }
++                else {
++                  if (!vorbis_cfg.kate_all_streams && strcmp(k.ki->category, "lyrics")) {
++#ifdef DEBUG
++                    g_message("Kate stream is not lyrics (%s): ignoring\n", k.ki->category);
++#endif
++                    ogg_stream_clear(&kst);
++                    kate_high_decode_clear(&k);
++                    kate_init_state = kis_sync;
++                  }
++                  else {
++                      kate_init_state = kis_all;
++                  }
++                }
++              }
++              else {
++#ifdef DEBUG
++                g_message("Initial Kate page did not contain Kate BOS header\n");
 +                ogg_stream_clear(&kst);
 +                kate_high_decode_clear(&k);
 +                kate_init_state = kis_sync;
-+            }
-+            else {
-+                kate_init_state = kis_all;
++#endif
++              }
 +            }
 +        }
 +        else if (kate_init_state == kis_all) {

 
     return tuple;
 }
@@ -691,7 +917,8 @@
                                         "Jorn Baayen <jorn@nl.linux.org>\n"
                                         "Haavard Kvaalen <havardk@xmms.org>\n"
                                         "Gian-Carlo Pascutto <gcp@sjeng.org>\n"

     if (ov_open_callbacks(datasource, &vf, NULL, 0, aud_vfs_is_streaming(fd->fd) ? vorbis_callbacks_stream : vorbis_callbacks) < 0) {
         vorbis_callbacks.close_func(datasource);
         g_mutex_unlock(vf_mutex);
@@ -430,6 +656,22 @@
             last_section = current_section;
          
         }
