 +#include "libswscale/swscale.h"
 +
 +#ifdef HAVE_OGGKATE
++
 +#include <kate/kate.h>
-+#endif
-+
-+#ifdef HAVE_OGGKATE
 +
 +/* if no canvas size if specified, default to DVD size, that's a good guess */
 +#define DEFAULT_CANVAS_WIDTH 720

+    katedec_has_kin=0;
+    vo_osd_changed(OSDTYPE_KATE);
+  }
+#endif
+}
+
+void katedec_tick(sh_sub_t *sh, double pts)
+{
+#ifdef HAVE_OGGKATE
+  if (katedec_has_kin) {
+    /* if an event has an end time equal to its start time, we keep it till
+       the next one arrives (some DVDs have that kind of end-less SPUs).

   {
diff -ruN -x 'config.*' -x configure.log -x '*.o' -x allformats.c -x vidix -x codecs.conf.h -x version.h -x help_mp.h mplayer-svn/subreader.c mplayer-svn-with-kate/subreader.c
--- mplayer-svn/subreader.c	2008-03-14 13:27:01.000000000 +0000
+++ mplayer-svn-with-kate/subreader.c	2008-10-11 14:05:32.000000000 +0100
@@ -24,6 +24,12 @@
 #include <enca.h>
 #endif
