mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gst/rtpmanager/gstrtpbin.c: Reset the sync parameters when clearing the payload type map too.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_reset_sync), (gst_rtp_bin_clear_pt_map): Reset the sync parameters when clearing the payload type map too. Fixes #562312.
This commit is contained in:
parent
a2d7487ee1
commit
a80f7dc19a
1 changed files with 27 additions and 24 deletions
|
@ -685,6 +685,30 @@ return_true (gpointer key, gpointer value, gpointer user_data)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_rtp_bin_reset_sync (GstRtpBin * rtpbin)
|
||||||
|
{
|
||||||
|
GSList *clients, *streams;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (rtpbin, "Reset sync on all clients");
|
||||||
|
|
||||||
|
GST_RTP_BIN_LOCK (rtpbin);
|
||||||
|
for (clients = rtpbin->clients; clients; clients = g_slist_next (clients)) {
|
||||||
|
GstRtpBinClient *client = (GstRtpBinClient *) clients->data;
|
||||||
|
|
||||||
|
/* reset sync on all streams for this client */
|
||||||
|
for (streams = client->streams; streams; streams = g_slist_next (streams)) {
|
||||||
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
||||||
|
|
||||||
|
/* make use require a new SR packet for this stream before we attempt new
|
||||||
|
* lip-sync */
|
||||||
|
stream->have_sync = FALSE;
|
||||||
|
stream->unix_delta = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_rtp_bin_clear_pt_map (GstRtpBin * bin)
|
gst_rtp_bin_clear_pt_map (GstRtpBin * bin)
|
||||||
{
|
{
|
||||||
|
@ -711,6 +735,9 @@ gst_rtp_bin_clear_pt_map (GstRtpBin * bin)
|
||||||
GST_RTP_SESSION_UNLOCK (session);
|
GST_RTP_SESSION_UNLOCK (session);
|
||||||
}
|
}
|
||||||
GST_RTP_BIN_UNLOCK (bin);
|
GST_RTP_BIN_UNLOCK (bin);
|
||||||
|
|
||||||
|
/* reset sync too */
|
||||||
|
gst_rtp_bin_reset_sync (bin);
|
||||||
}
|
}
|
||||||
|
|
||||||
static RTPSession *
|
static RTPSession *
|
||||||
|
@ -794,30 +821,6 @@ free_client (GstRtpBinClient * client)
|
||||||
g_free (client);
|
g_free (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_rtp_bin_reset_sync (GstRtpBin * rtpbin)
|
|
||||||
{
|
|
||||||
GSList *clients, *streams;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (rtpbin, "Reset sync on all clients");
|
|
||||||
|
|
||||||
GST_RTP_BIN_LOCK (rtpbin);
|
|
||||||
for (clients = rtpbin->clients; clients; clients = g_slist_next (clients)) {
|
|
||||||
GstRtpBinClient *client = (GstRtpBinClient *) clients->data;
|
|
||||||
|
|
||||||
/* reset sync on all streams for this client */
|
|
||||||
for (streams = client->streams; streams; streams = g_slist_next (streams)) {
|
|
||||||
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
|
||||||
|
|
||||||
/* make use require a new SR packet for this stream before we attempt new
|
|
||||||
* lip-sync */
|
|
||||||
stream->have_sync = FALSE;
|
|
||||||
stream->unix_delta = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* associate a stream to the given CNAME. This will make sure all streams for
|
/* associate a stream to the given CNAME. This will make sure all streams for
|
||||||
* that CNAME are synchronized together.
|
* that CNAME are synchronized together.
|
||||||
* Must be called with GST_RTP_BIN_LOCK */
|
* Must be called with GST_RTP_BIN_LOCK */
|
||||||
|
|
Loading…
Reference in a new issue