rtp example: Fix leak
authorOlivier Crête <olivier.crete@collabora.com>
Mon, 11 Jul 2016 15:59:19 +0000 (11:59 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Mon, 11 Jul 2016 15:59:21 +0000 (11:59 -0400)
Also stop fetching the internal source as this
functionality has been broken.

tests/examples/rtp/client-PCMA.c

index 664b336..8d7da61 100644 (file)
@@ -88,13 +88,19 @@ on_ssrc_active_cb (GstElement * rtpbin, guint sessid, guint ssrc,
   /* get the right session */
   g_signal_emit_by_name (rtpbin, "get-internal-session", sessid, &session);
 
+#if 0
+  /* FIXME: This is broken in rtpbin */
   /* get the internal source (the SSRC allocated to us, the receiver */
   g_object_get (session, "internal-source", &isrc, NULL);
   print_source_stats (isrc);
+  g_object_unref (isrc);
+#endif
 
   /* get the remote source that sent us RTCP */
   g_signal_emit_by_name (session, "get-source-by-ssrc", ssrc, &osrc);
   print_source_stats (osrc);
+  g_object_unref (osrc);
+  g_object_unref (session);
 }
 
 /* will be called when rtpbin has validated a payload that we can depayload */