From 43e1dcbd1842a7723a5dc3cc036033abb5a31363 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Wed, 8 Oct 2008 12:12:01 +0000 Subject: [PATCH] ext/ogg/gstoggmux.c: Unref all buffers when clearing collectpads. Fixes bug #546955. Original commit message from CVS: Patch by: Daniel Drake * ext/ogg/gstoggmux.c: (gst_ogg_mux_clear_collectpads): Unref all buffers when clearing collectpads. Fixes bug #546955. --- ChangeLog | 7 +++++++ ext/ogg/gstoggmux.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12bfe0e5f1..49b9bb964a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-08 Sebastian Dröge + + Patch by: Daniel Drake + + * ext/ogg/gstoggmux.c: (gst_ogg_mux_clear_collectpads): + Unref all buffers when clearing collectpads. Fixes bug #546955. + 2008-10-08 Sebastian Dröge Based on a patch by: Klaas diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 1cacfc9c99..21ea697e55 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -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; + } } }