fix mem leak (patch from upstream)
authorEunhae Choi <eunhae1.choi@samsung.com>
Wed, 21 Dec 2016 04:51:40 +0000 (13:51 +0900)
committereunhae choi <eunhae1.choi@samsung.com>
Thu, 22 Dec 2016 07:52:13 +0000 (23:52 -0800)
Change-Id: Ia0190d4d4cd70ec9b8c6461f846f0897a0bfd938
(cherry picked from commit a131c90a08ae31c0d3b96378dd5fd75f55312a0f)

sys/dvb/dvbbasebin.c
sys/vdpau/gstvdpdecoder.c

index 2e6dcfd..e89febd 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * dvbbasebin.c - 
+ * dvbbasebin.c -
  * Copyright (C) 2007 Alessandro Decina
  * Copyright (C) 2014 Samsung Electronics. All rights reserved.
- * 
+ *
  * Authors:
  *   Alessandro Decina <alessandro@nnva.org>
  *   Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
@@ -509,6 +509,7 @@ dvb_base_bin_init (DvbBaseBin * dvbbasebin)
   if (dvbbasebin->tsparse != NULL) {
     pad = gst_element_get_static_pad (dvbbasebin->tsparse, "src");
     ghost = gst_ghost_pad_new ("src", pad);
+    gst_object_unref (pad);
   } else {
     ghost = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
   }
index b41861f..c3892f2 100644 (file)
@@ -360,6 +360,9 @@ gst_vdp_decoder_class_init (GstVdpDecoderClass * klass)
 
   gst_element_class_add_pad_template (element_class, src_template);
 
+  if (src_caps)
+    gst_caps_unref (src_caps);
+
   g_object_class_install_property (object_class,
       PROP_DISPLAY, g_param_spec_string ("display", "Display", "X Display name",
           NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));