
From: Daniel Drake <dsd@laptop.org>

Index: gst-plugins-base-0.10.19/ext/ogg/gstoggmux.c
===================================================================
--- gst-plugins-base-0.10.19.orig/ext/ogg/gstoggmux.c
+++ gst-plugins-base-0.10.19/ext/ogg/gstoggmux.c
@@ -1572,6 +1572,15 @@ gst_ogg_mux_clear_collectpads (GstCollec
     }
     g_queue_free (oggpad->pagebuffers);
     oggpad->pagebuffers = NULL;
+
+    if (oggpad->buffer) {
+      gst_buffer_unref(oggpad->buffer);
+      oggpad->buffer = NULL;
+    }
+    if (oggpad->next_buffer) {
+      gst_buffer_unref(oggpad->next_buffer);
+      oggpad->next_buffer = NULL;
+    }
   }
 }
 
