[0.11] gst-plugins-base: oggdemux: fix push mode chain leak

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 12 16:17:59 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: 9f4b71b2a71fd3f2b6c82ed74a6273dfbca5a3eb
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=9f4b71b2a71fd3f2b6c82ed74a6273dfbca5a3eb

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Wed Jan 11 16:17:42 2012 +0000

oggdemux: fix push mode chain leak

When I first implemented push mode seeking, I removed the chain
freeing there as it could be used later. The current code does not
seem to do that though, so I'm restoring the previous freeing,
which plugs the leak while apparently not reintroducing use of
freed data with chained and normal files, both with gst-launch
playbin2 and Totem.

---

 ext/ogg/gstoggdemux.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index 6afcae6..5baef83 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -2436,10 +2436,12 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg)
 
     pad->added = FALSE;
   }
-  /* With push mode seeking implemented, we can now seek back to the chain,
-     so we do not destroy it */
-  GST_DEBUG_OBJECT (ogg, "Resetting current chain");
-  ogg->current_chain = NULL;
+
+  /* if we cannot seek back to the chain, we can destroy the chain 
+   * completely */
+  if (!ogg->pullmode) {
+    gst_ogg_chain_free (chain);
+  }
 
   return TRUE;
 }



More information about the gstreamer-commits mailing list