Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-09-23 22:25:36 +0300
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2020-09-24 16:54:05 +0300
commit345f74b09d2a8eb421f9c77d8d2a65aec0e83005 (patch)
treee6f7d06dece730411b3312bd832408a437f9e183 /gst
parentecc110ca8bd0ab30ad01c3de849383fee41e1b82 (diff)
rtpbin: Remove the rtpjitterbuffer with the stream
Since !348, the jitterbuffer was only removed with the session. This restores the original behaviour and removes the jitterbuffer when the stream is removed. This avoid accumulating jitterbuffer objects into the bin when a session is reused. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/735>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/gstrtpbin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index bdb16a0a3..1fb98ffc7 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -859,6 +859,7 @@ free_session (GstRtpBinSession * sess, GstRtpBin * bin)
g_slist_foreach (sess->elements, (GFunc) remove_bin_element, bin);
g_slist_free (sess->elements);
+ sess->elements = NULL;
g_slist_foreach (sess->streams, (GFunc) free_stream, bin);
g_slist_free (sess->streams);
@@ -1849,6 +1850,7 @@ no_demux:
static void
free_stream (GstRtpBinStream * stream, GstRtpBin * bin)
{
+ GstRtpBinSession *sess = stream->session;
GSList *clients, *next_client;
GST_DEBUG_OBJECT (bin, "freeing stream %p", stream);
@@ -1875,7 +1877,10 @@ free_stream (GstRtpBinStream * stream, GstRtpBin * bin)
if (stream->buffer_ntpstop_sig)
g_signal_handler_disconnect (stream->buffer, stream->buffer_ntpstop_sig);
+ sess->elements = g_slist_remove (sess->elements, stream->buffer);
+ remove_bin_element (stream->buffer, bin);
gst_object_unref (stream->buffer);
+
if (stream->demux)
gst_bin_remove (GST_BIN_CAST (bin), stream->demux);