From c9a4ad58b3c7208f0b552d6faf3c45cf4caa30ed Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 30 Jul 2015 14:36:41 +0900 Subject: [PATCH] Fix displaying stats if there's no RR Change-Id: I021e4d911a9c513771632411fcdade931ad3de46 --- gst/rtsp-server/rtsp-client-wfd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/rtsp-server/rtsp-client-wfd.c b/gst/rtsp-server/rtsp-client-wfd.c index 8737834..57a158e 100644 --- a/gst/rtsp-server/rtsp-client-wfd.c +++ b/gst/rtsp-server/rtsp-client-wfd.c @@ -356,7 +356,7 @@ gst_rtsp_wfd_client_start_wfd (GstRTSPWFDClient * client) } static gboolean -wfd_display_rtp_stats(gpointer userdata) +wfd_display_rtp_stats (gpointer userdata) { guint16 seqnum = 0; guint64 bytes = 0; @@ -438,8 +438,12 @@ static gboolean wfd_configure_client_media (GstRTSPClient * client, GstRTSPMedia * media, GstRTSPStream * stream, GstRTSPContext * ctx) { - if (stream) + if (stream) { + GstRTSPWFDClientPrivate *priv = GST_RTSP_WFD_CLIENT_GET_PRIVATE (client); + if (priv) + priv->stats.stream = stream; g_signal_connect (stream, "rtcp-statistics", (GCallback) on_rtcp_stats, client); + } return GST_RTSP_CLIENT_CLASS (gst_rtsp_wfd_client_parent_class)->configure_client_media (client, media, stream, ctx); } -- 2.7.4