[0.10] gst-plugins-good: v4l2src: fix caps leak

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 18 03:55:42 PST 2012


Module: gst-plugins-good
Branch: 0.10
Commit: b932fc844b60e470802c80d797699b9c31647690
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=b932fc844b60e470802c80d797699b9c31647690

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Fri Jan 13 17:25:59 2012 +0000

v4l2src: fix caps leak

---

 sys/v4l2/gstv4l2src.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index e2175a4..f8ae09c 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -522,11 +522,12 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
       }
     }
     gst_caps_unref (thiscaps);
-    gst_caps_unref (peercaps);
   } else {
     /* no peer or peer have ANY caps, work with our own caps then */
     caps = thiscaps;
   }
+  if (peercaps)
+    gst_caps_unref (peercaps);
   if (caps) {
     caps = gst_caps_make_writable (caps);
     gst_caps_truncate (caps);



More information about the gstreamer-commits mailing list