ext/ogg/gstoggmux.c: Unref all buffers when clearing collectpads. Fixes bug #546955.
authorDaniel Drake <dsd@laptop.org>
Wed, 8 Oct 2008 12:12:01 +0000 (12:12 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Wed, 8 Oct 2008 12:12:01 +0000 (12:12 +0000)
Original commit message from CVS:
Patch by: Daniel Drake <dsd at laptop dot org>
* ext/ogg/gstoggmux.c: (gst_ogg_mux_clear_collectpads):
Unref all buffers when clearing collectpads. Fixes bug #546955.

ChangeLog
ext/ogg/gstoggmux.c

index 12bfe0e..49b9bb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-08  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
 
+       Patch by: Daniel Drake <dsd at laptop dot org>
+
+       * ext/ogg/gstoggmux.c: (gst_ogg_mux_clear_collectpads):
+       Unref all buffers when clearing collectpads. Fixes bug #546955.
+
+2008-10-08  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
+
        Based on a patch by: Klaas <klaas at rivercrew dot net>
 
        * ext/vorbis/vorbisenc.c: (gst_vorbis_enc_sink_event),
index 1cacfc9..21ea697 100644 (file)
@@ -1613,6 +1613,15 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect)
     }
     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;
+    }
   }
 }