 +}
 +
 +static GstClockTime
-+gst_kate_enc_granule_time(kate_state *k, gint64 granulepos)
++gst_kate_enc_granule_time (kate_state *k, gint64 granulepos)
 +{
 +  float t;
 +
 +  if (granulepos == -1)
 +    return -1;
 +
-+  t = kate_granule_time(k->ki, granulepos);
++  t = kate_granule_time (k->ki, granulepos);
 +  return t*GST_SECOND;
 +}
 +

+  return ret;
+}
--- /dev/null	2008-04-05 19:24:09.000000000 +0100
+++ gst-plugins-bad/ext/kate/gstkateparse.h	2008-06-19 21:51:21.000000000 +0100
@@ -0,0 +1,79 @@
+/* -*- c-basic-offset: 2 -*-
+ * GStreamer

+    for (x=0; x<kb->width; ) {
+      if (nybble_offset[y&1] >= max_nybbles[y&1]) {
+        GST_DEBUG_OBJECT (ke, "RLE overflow, clearing the remainder");
+        memset (kb->pixels+n, 0, kb->width-x);
+        n += kb->width-x;
+        break;
+      }
+      code = gst_kate_enc_get_rle_code (pixptr[y&1], &nybble_offset[y&1]);
+      if (code == 0) {
+        memset (kb->pixels+n, 0, kb->width-x);
+        n += kb->width-x;
