Skip to content

rtsp-media: wait for all GstRTSPStreamBlocking messages

Make sure rtsp-media have received a GstRTSPStreamBlocking message from each active stream when checking if all streams are blocked.

Without this change there will be a race condition when using two or more streams and rtsp-media receives a GstRTSPStreamBlocking message from one of the streams. This is because rtsp-media then checks if all streams are blocked by calling gst_rtsp_stream_is_blocking() for each stream. This function call returns TRUE if the stream has sent a GstRTSPStreamBlocking message, however, rtsp-media may have yet to receive this message. This would then result in that rtsp-media erroneously thinks it is blocking all streams which could result in rtsp-media changing state, from PREPARING to PREPARED. In the case of a preroll, this could result in that rtsp-media thinks that the pipeline is prerolled even though that might not be the case.

Edited by Ludvig Rappe

Merge request reports