Skip to content

WIP: rtsp-media: Don't set the sinks to PLAYING on NO_PREROLL

Instead handle the sink states independent of the remainder of the
pipeline state. This way we can start producing data in live pipelines
while the sinks don't send out data yet until the PLAY/RECORD request is
fully handled.

This prevents sending data out before the PLAY response and also
prevents the PLAY reponse to contain sequence numbers of a packet later
than the first one, which then would cause clients to drop the first few
packets that were actually received.

This allows live medias to work correctly again without sometimes losing
the first keyframe, or generally the first packets.

Can be reproduced with ./test-launch "( videotestsrc is-live=true ! timeoverlay ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 audiotestsrc is-live=true ! avenc_aac ! rtpmp4gpay name=pay1 pt=97 )"

Edited by Tim-Philipp Müller

Merge request reports