From: Wim Taymans Date: Fri, 26 Jul 2013 15:23:10 +0000 (+0200) Subject: session: create SSRC before doing session cleanup X-Git-Tag: 1.19.3~509^2~5535 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cce6fb04ca1ada65625a71a18615aa7c4203e49;p=platform%2Fupstream%2Fgstreamer.git session: create SSRC before doing session cleanup Make the internal source before we do session cleanup --- diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 3e4914f..92066c3 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -3228,6 +3228,15 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time, /* get a new interval, we need this for various cleanups etc */ data.interval = calculate_rtcp_interval (sess, TRUE, sess->first_rtcp); + /* we need an internal source now */ + if (sess->stats.internal_sources == 0) { + RTPSource *source; + gboolean created; + + source = obtain_internal_source (sess, sess->suggested_ssrc, &created); + g_object_unref (source); + } + /* Make a local copy of the hashtable. We need to do this because the * cleanup stage below releases the session lock. */ table_copy = g_hash_table_new_full (NULL, NULL, NULL, @@ -3248,15 +3257,6 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time, if (!is_rtcp_time (sess, current_time, &data)) goto done; - /* we need an internal source now */ - if (sess->stats.internal_sources == 0) { - RTPSource *source; - gboolean created; - - source = obtain_internal_source (sess, sess->suggested_ssrc, &created); - g_object_unref (source); - } - /* generate RTCP for all internal sources */ g_hash_table_foreach (sess->ssrcs[sess->mask_idx], (GHFunc) generate_rtcp, &data);