 +            msg_Err( p_dec, "Kate failed to initialize for decoding: %d", ret );
 +            return VLC_EGENERIC;
 +        }
-+        p_sys->ready = VLC_TRUE;
++        p_sys->b_ready = VLC_TRUE;
 +    }
 +#ifdef ENABLE_PACKETIZER
 +    else

+        else p_sys->i_headers++;
+    }
+
+    return ProcessPacket( p_dec, &oggpacket, pp_block );
+}
+
+/*****************************************************************************

+    kate_info_remove_markup( &p_sys->ki, 1 );
+
+    /* parse all remaining header packets */
+    for (headeridx=1; headeridx<p_sys->ki.num_headers; ++headeridx)
+    {
+        kp.nbytes = *(p_extra++) << 8;
+        kp.nbytes |= (*(p_extra++) & 0xFF);
+        kp.data = p_extra;
+        p_extra += kp.nbytes;
+        i_extra -= (kp.nbytes + 2);
+        if( i_extra < 0 )
+        {
+            msg_Err( p_dec, "header %d data corrupted", headeridx);
+            return VLC_EGENERIC;
+        }
+
+        ret = kate_decode_headerin( &p_sys->ki, &p_sys->kc, &kp );
+        if( ret < 0 )
+        {
+            msg_Err( p_dec, "Kate header %d is corrupted: %d", headeridx, ret);
