GNOME Bugzilla – Bug 796624
rtspclientsink: doesn't wait for all streams to be blocked
Last modified: 2018-06-21 11:04:46 UTC
Test pipeline: audiotestsrc ! queue ! audioresample ! queue ! faac ! rsink. videotestsrc ! queue ! videoconvert ! queue ! x264enc tune=zerolatency ! video/x-h264,profile=baseline,width=1280,height=720,framerate=30/1 ! rsink. rtspclientsink name=rsink location=rtsp://127.0.0.1:8554/test debug=1 produces ERROR default rtsp-sdp.c:585:gst_rtsp_sdp_from_stream: stream 0x7f02c01f13a0 has no caps against ./examples/test-record '( decodebin name=depay0 ! autovideosink decodebin name=depay1 ! autoaudiosink )' ERROR rtspmedia rtsp-media.c:3788:default_handle_sdp: 0x7fda00034290: Media has more or less streams than SDP (2 /= 1) ERROR rtspclient rtsp-client.c:2764:handle_sdp: client 0x5650b908a190: could not handle SDP ERROR rtspclient rtsp-client.c:2941:handle_announce_request: client 0x5650b908a190: can't handle SDP ERROR rtspclient rtsp-client.c:1497:handle_pause_request: client 0x5650b908a2a0: no session Results in rtspcliensink sending an SDP with only one media in it around 95% of the time as evidenced by the errors above. The problem is that the GstRTSPStreamBlocking message is sent multiple times for multiple streams but only the first is used to unblock all the streams. This works in 1.12 as expected so is a regression.
Created attachment 372719 [details] [review] rtspclientsink: fix waiting for multiple streams
This doesn't look quite complete (neither did the code it's replacing) - there's no way to exit this waiting loop early if the element state is changed. I guess that's what you mean by the FIXME. I also notice that #64f1a3 (that added this blocking logic) also quietly removed the sink->in_async = TRUE; line in gst_rtsp_client_sink_start(), so probably none of the async logic is working properly right now.
commit ebefb77db1b013041302ea3f2958daa6803dc696 Author: Matthew Waters <matthew@centricular.com> Date: Tue Jun 19 14:53:02 2018 +1000 rtspclientsink: fix waiting for multiple streams We were previously only ever waiting for a single stream to notify it's blocked status through GstRTSPStreamBlocking. Actually count streams to wait for. Fixes rtspclientsink sending SDP's without out some of the input streams. https://bugzilla.gnome.org/show_bug.cgi?id=796624 1.14 ebefb77db1b013041302ea3f2958daa6803dc696