From: Anila Balavan Date: Fri, 30 Jan 2015 11:50:20 +0000 (+0100) Subject: rtsp-stream: RTCP and RTP transport cache cookies seperated X-Git-Tag: 1.19.3~495^2~697 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18668bf49570b3ab75e35dd275f4761f0210cc42;hp=6987a00fa9e3a918498a311a4069a427373a5d32;p=platform%2Fupstream%2Fgstreamer.git rtsp-stream: RTCP and RTP transport cache cookies seperated RTCP packets were not sent because the same tr_cache_cookie was used for both RTP and RTCP. So only one of the tr_cache lists were populated depending on which one was sent first. If the tr_cache list is not populated then no packets can be sent. Most often this happened to be RTCP. Now seperate RTCP and RTP transport cache cookies are added which resulted in both the tr_cache_lists to be populated regardless of which one was sent first. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=743734 --- diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 9a7a59f..d2e0432 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -141,7 +141,9 @@ struct _GstRTSPStreamPrivate guint transports_cookie; GList *tr_cache_rtp; GList *tr_cache_rtcp; - guint tr_cache_cookie; + guint tr_cache_cookie_rtp; + guint tr_cache_cookie_rtcp; + /* UDP sources for UDP multicast transports */ GList *transport_sources; @@ -1610,19 +1612,26 @@ handle_new_sample (GstAppSink * sink, gpointer user_data) is_rtp = GST_ELEMENT_CAST (sink) == priv->appsink[0]; g_mutex_lock (&priv->lock); - if (priv->tr_cache_cookie != priv->transports_cookie) { - clear_tr_cache (priv, is_rtp); - for (walk = priv->transports; walk; walk = g_list_next (walk)) { - GstRTSPStreamTransport *tr = (GstRTSPStreamTransport *) walk->data; - if (is_rtp) { + if (is_rtp) { + if (priv->tr_cache_cookie_rtp != priv->transports_cookie) { + clear_tr_cache (priv, is_rtp); + for (walk = priv->transports; walk; walk = g_list_next (walk)) { + GstRTSPStreamTransport *tr = (GstRTSPStreamTransport *) walk->data; priv->tr_cache_rtp = g_list_prepend (priv->tr_cache_rtp, g_object_ref (tr)); - } else { + } + priv->tr_cache_cookie_rtp = priv->transports_cookie; + } + } else { + if (priv->tr_cache_cookie_rtcp != priv->transports_cookie) { + clear_tr_cache (priv, is_rtp); + for (walk = priv->transports; walk; walk = g_list_next (walk)) { + GstRTSPStreamTransport *tr = (GstRTSPStreamTransport *) walk->data; priv->tr_cache_rtcp = g_list_prepend (priv->tr_cache_rtcp, g_object_ref (tr)); } + priv->tr_cache_cookie_rtcp = priv->transports_cookie; } - priv->tr_cache_cookie = priv->transports_cookie; } g_mutex_unlock (&priv->lock);