rtspclientsink: if OPEN failed, unqueue next command

As READY_TO_PAUSED can no longer return async, the RECORD
command will be queued before the OPEN command fails
(for example in case the server could not be connected),
and record then waits for ever.

https://bugzilla.gnome.org/show_bug.cgi?id=793896
This commit is contained in:
Mathieu Duponchelle 2018-02-27 20:34:49 +01:00
parent ba9395c158
commit 6f308daa5f

View file

@ -4684,7 +4684,9 @@ gst_rtsp_client_sink_thread (GstRTSPClientSink * sink)
switch (cmd) {
case CMD_OPEN:
gst_rtsp_client_sink_open (sink, TRUE);
if (gst_rtsp_client_sink_open (sink, TRUE) == GST_RTSP_ERROR)
gst_rtsp_client_sink_loop_send_cmd (sink, CMD_WAIT,
CMD_ALL & ~CMD_CLOSE);
break;
case CMD_RECORD:
gst_rtsp_client_sink_record (sink, TRUE);