GNOME Bugzilla – Bug 796886
rtspsrc: consistently send TEARDOWN.
Last modified: 2018-07-28 13:07:24 UTC
Created attachment 373189 [details] [review] rtspsrc: consistently send TEARDOWN. When going from PLAYING to NULL with a source that doesn't support the PAUSE command, the CMD_WAIT command interrupts the CMD_CLOSE, cancelling the TEARDOWN. Even more, the CMD_WAIT command that is sent when interrupting the loop will set the pending_cmd to CMD_LOOP, making sure that the next command might still flush the GstRtspConnection, effectively cancelling the TEARDOWN. This also fixes the case of gst-play that was mentioned in bug 748360, comment 6
This achieves the same thing as my patch for bug 751994 - it avoids shutting down the background thread until the command has been processed, but without the timeout I added, it could block indefinitely waiting for that to happen so I think it's better the keep the timeout. Sorry for the overlap and duplicated effort, but thanks for the patch! *** This bug has been marked as a duplicate of bug 751994 ***
(please continue on the other bug if you disagree)