x264enc: do not leak peer pad reference
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 4 May 2011 10:30:39 +0000 (12:30 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 4 May 2011 10:30:39 +0000 (12:30 +0200)
ext/x264/gstx264enc.c

index 8bf840818bb8b9cfb4773bbba0db073673b55938..ff3a34f98818270408308a978a90af720f57e134 100644 (file)
@@ -1495,6 +1495,8 @@ gst_x264_enc_sink_get_caps (GstPad * pad)
 
     caps = gst_caps_intersect (peercaps, templcaps);
     gst_caps_unref (peercaps);
+    gst_object_unref (peer);
+    peer = NULL;
   } else {
     caps = gst_caps_ref (gst_pad_get_pad_template_caps (pad));
   }