[0.11] gst-plugins-bad: rsnaudiomunge: keep the object ref longer

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 04:23:59 PST 2012


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

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Fri Jan 20 10:42:21 2012 +0000

rsnaudiomunge: keep the object ref longer

Since we do not get a ref to the pad, I'm not certain it's safe
to drop the object and use the pad later, so hold the object ref
till we're done with the pad.

---

 ext/resindvd/rsnaudiomunge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/resindvd/rsnaudiomunge.c b/ext/resindvd/rsnaudiomunge.c
index 94cf7b1..678bd1e 100644
--- a/ext/resindvd/rsnaudiomunge.c
+++ b/ext/resindvd/rsnaudiomunge.c
@@ -154,9 +154,9 @@ rsn_audiomunge_set_caps (GstPad * pad, GstCaps * caps)
   g_return_val_if_fail (munge != NULL, FALSE);
 
   otherpad = (pad == munge->srcpad) ? munge->sinkpad : munge->srcpad;
-  gst_object_unref (munge);
 
   ret = gst_pad_set_caps (otherpad, caps);
+  gst_object_unref (munge);
   return ret;
 }
 



More information about the gstreamer-commits mailing list