From b7820a0de74d686724d731433c494b6499a8bc28 Mon Sep 17 00:00:00 2001 From: Marc Leeman Date: Thu, 30 Sep 2021 13:19:40 +0200 Subject: [PATCH] rtpsink: set sync off on rtcp_sink When using the following setup (the error can be reproduced using simpler sender pipelines), the receiver resynchronises the clock on RTCP packets. The effect was that a couple seconds were cut out of the playback because an initial RTCP packet was dropped. When sending out all RTCP packets (setting sync=FALSE on the RTCP updsink), the playback is fine. This syncs rtpsink with rtpsrc (where this property was already set). gst-launch-1.0 filesrc location=899-en.mp3 \ ! mpegaudioparse \ ! mpg123audiodec \ ! audioconvert \ ! audioresample \ ! avenc_g722 \ ! rtpg722pay ! rtpsink uri=rtp://239.1.2.3:1234 gst-launch-1.0 uridecodebin rtp://239.1.2.3:1234?encoding-name=G722 \ ! autoaudiosink Part-of: --- subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c b/subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c index 4ef6ca7..1695e7c 100644 --- a/subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c +++ b/subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c @@ -506,6 +506,7 @@ gst_rtp_sink_start (GstRtpSink * self) "close-socket", FALSE, NULL); g_object_unref (socket); + g_object_set (self->rtcp_sink, "sync", FALSE, "async", FALSE, NULL); gst_element_set_locked_state (self->rtcp_sink, FALSE); gst_element_sync_state_with_parent (self->rtcp_sink); -- 2.7.4