Index: gstbz2.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ext/bz2/gstbz2.c,v
retrieving revision 1.3
diff -u -3 -p -b -B -d -r1.3 gstbz2.c
--- gstbz2.c	1 Apr 2006 10:09:05 -0000	1.3
+++ gstbz2.c	6 Jun 2006 19:06:09 -0000
@@ -30,9 +30,9 @@
 static gboolean
 plugin_init (GstPlugin * p)
 {
-  if (!gst_element_register (p, "bz2enc", GST_RANK_NONE, GST_TYPE_BZ2ENC))
+  if (!gst_element_register (p, "bz2enc", GST_RANK_PRIMARY, GST_TYPE_BZ2ENC))
     return FALSE;
-  if (!gst_element_register (p, "bz2dec", GST_RANK_NONE, GST_TYPE_BZ2DEC))
+  if (!gst_element_register (p, "bz2dec", GST_RANK_PRIMARY, GST_TYPE_BZ2DEC))
     return FALSE;
   return TRUE;
 }
Index: gstbz2dec.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ext/bz2/gstbz2dec.c,v
retrieving revision 1.6
diff -u -3 -p -b -B -d -r1.6 gstbz2dec.c
--- gstbz2dec.c	28 May 2006 17:08:17 -0000	1.6
+++ gstbz2dec.c	6 Jun 2006 19:06:09 -0000
@@ -124,10 +124,19 @@ gst_bz2dec_chain (GstPad * pad, GstBuffe
     guint n;
     GstFlowReturn fr;
 
-    /* Create the output buffer */
-    if ((fr = gst_pad_alloc_buffer (src, b->offset,
+    /* Create the output buffer. We need one even if we are not linked. */
+    switch (fr = gst_pad_alloc_buffer (src, b->offset,
                 b->offset ? b->buffer_size : b->first_buffer_size,
-                GST_PAD_CAPS (src), &out)) != GST_FLOW_OK) {
+          GST_PAD_CAPS (src), &out)) {
+    case GST_FLOW_OK:
+      break;
+    case GST_FLOW_NOT_LINKED:
+      out = gst_buffer_new_and_alloc (
+          b->offset ? b->buffer_size : b->first_buffer_size);
+      if (out)
+        break;
+      /* fall through */
+    default:
       gst_bz2dec_decompress_init (b);
       return fr;
     }
