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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/993>
This commit is contained in:
Marc Leeman 2021-09-30 13:19:40 +02:00 committed by GStreamer Marge Bot
parent 7aa88364ac
commit b7820a0de7

View 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);