aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-06-23 16:59:07 +0200
committerghost <andreas.monzner@multimedia-labs.de>2009-06-23 16:59:07 +0200
commit513aca2c11a757fc9207895bb9b89434997ba029 (patch)
tree43137cb60ae02742a48bebb5a030d24baa406caa /packages
parentb1dac8e66784747b958387fa0392bd136be75282 (diff)
downloadopenembedded-513aca2c11a757fc9207895bb9b89434997ba029.tar.gz
gst-plugins-good_0.10.15.bb: backport matroskademux memleak fix
Diffstat (limited to 'packages')
-rw-r--r--packages/gstreamer/gst-plugins-good/backport_matroskademux_memleak_fix.patch86
-rw-r--r--packages/gstreamer/gst-plugins-good_0.10.15.bb6
2 files changed, 90 insertions, 2 deletions
diff --git a/packages/gstreamer/gst-plugins-good/backport_matroskademux_memleak_fix.patch b/packages/gstreamer/gst-plugins-good/backport_matroskademux_memleak_fix.patch
new file mode 100644
index 0000000000..d4edc88ade
--- /dev/null
+++ b/packages/gstreamer/gst-plugins-good/backport_matroskademux_memleak_fix.patch
@@ -0,0 +1,86 @@
+From 9600c549380d97f79e7a948a3367962405c93f05 Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wim.taymans@collabora.co.uk>
+Date: Tue, 23 Jun 2009 10:42:33 +0000
+Subject: matroskademux: avoid leaking buffers
+
+Don't leak buffers when resyncing to a keyframe.
+Avoid leaking buffers when exiting the loop on error conditions.
+Add some more debug info.
+
+Fixes #585911
+---
+diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
+index 5c12482..0737175 100644
+--- a/gst/matroska/matroska-demux.c
++++ b/gst/matroska/matroska-demux.c
+@@ -873,6 +873,8 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
+
+ g_return_val_if_fail (GST_IS_BUFFER (buf), NULL);
+
++ GST_DEBUG ("decoding buffer %p", buf);
++
+ data = GST_BUFFER_DATA (buf);
+ size = GST_BUFFER_SIZE (buf);
+
+@@ -890,6 +892,7 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
+
+ return buf;
+ } else {
++ GST_DEBUG ("decode data failed");
+ gst_buffer_unref (buf);
+ return NULL;
+ }
+@@ -4010,6 +4013,10 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+ guint64 num;
+ guint8 *data;
+
++ if (buf) {
++ gst_buffer_unref (buf);
++ buf = NULL;
++ }
+ if ((ret = gst_ebml_read_buffer (ebml, &id, &buf)) != GST_FLOW_OK)
+ break;
+
+@@ -4272,6 +4279,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+
+ sub = gst_buffer_create_sub (buf,
+ GST_BUFFER_SIZE (buf) - size, lace_size[n]);
++ GST_WARNING_OBJECT (demux, "created subbuffer %p", sub);
+
+ if (stream->encodings != NULL && stream->encodings->len > 0)
+ sub = gst_matroska_decode_buffer (stream, sub);
+@@ -4301,7 +4309,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+
+ gst_matroska_demux_sync_streams (demux);
+
+-
+ if (duration) {
+ GST_BUFFER_DURATION (sub) = duration / laces;
+ stream->pos += GST_BUFFER_DURATION (sub);
+@@ -4326,6 +4333,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+ /* When doing seeks or such, we need to restart on key frames or
+ * decoders might choke. */
+ GST_DEBUG_OBJECT (demux, "skipping delta unit");
++ gst_buffer_unref (sub);
+ goto done;
+ }
+
+@@ -4361,6 +4369,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+
+ /* Postprocess the buffers depending on the codec used */
+ if (stream->postprocess_frame) {
++ GST_LOG_OBJECT (demux, "running post process");
+ ret = stream->postprocess_frame (GST_ELEMENT (demux), stream, &sub);
+ }
+
+@@ -4378,7 +4387,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
+ }
+
+ done:
+- if (readblock)
++ if (buf)
+ gst_buffer_unref (buf);
+ g_free (lace_size);
+
+--
+cgit v0.8.2
diff --git a/packages/gstreamer/gst-plugins-good_0.10.15.bb b/packages/gstreamer/gst-plugins-good_0.10.15.bb
index c8ffdf6ecf..f1969f6883 100644
--- a/packages/gstreamer/gst-plugins-good_0.10.15.bb
+++ b/packages/gstreamer/gst-plugins-good_0.10.15.bb
@@ -1,4 +1,6 @@
require gst-plugins.inc
-SRC_URI += "file://sed-with-autoconf-2.59.patch;patch=1;pnum=1"
DEPENDS += "gst-plugins-base"
-SRC_URI += "file://gst-plugins-good_configure_skip_shave.patch;patch=1;pnum=0" \ No newline at end of file
+SRC_URI += "file://sed-with-autoconf-2.59.patch;patch=1;pnum=1 \
+ file://gst-plugins-good_configure_skip_shave.patch;patch=1;pnum=0 \
+ file://backport_matroskademux_memleak_fix.patch;patch=1;pnum=1"
+PR = "r2" \ No newline at end of file