rtpsink: set sync off on rtcp_sink
authorMarc Leeman <m.leeman@televic.com>
Thu, 30 Sep 2021 11:19:40 +0000 (13:19 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 1 Oct 2021 22:57:02 +0000 (22:57 +0000)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/993>

subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c

index 4ef6ca7..1695e7c 100644 (file)
@@ -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);