GNOME Bugzilla – Bug 775543
rtspsrc: redirect-on-play skips stream cleanup and TEARDOWN
Last modified: 2016-12-07 09:23:58 UTC
Created attachment 341287 [details] [review] allow cleanup on redirect by leaving state changes to the redirect handlers The fix for http://bugzilla.gnome.org/show_bug.cgi?id=772610 allows redirect to happen in response to the PLAY command, but it's not performing the necessary cleanup of the initial session. The proposed fix is to simply remove the code in gst_rtspsrc_try_send that changes the state to GST_RTSP_STATE_INIT when it sets need_redirect to TRUE. In the case of redirect-on-describe, the current state is actually still GST_RTSP_STATE_INVALID when the redirect happens, so setting it to INIT seems like a mistake. In the case of redirect-on-play, the current state is GST_RTSP_STATE_READY, and it needs to stay that way so that the subsequent call to gst_rtsp_close (from gst_rtspsrc_play) knows what needs to be cleaned up.
Comment on attachment 341287 [details] [review] allow cleanup on redirect by leaving state changes to the redirect handlers Please attach as a "git format-patch" style format with a proper commit message that explains what this fixes and how :) Your explanation above makes sense though.
Created attachment 341410 [details] [review] change to allow session cleanup upon redirect-on-play
commit bc2adef5506602760cdd73ca6562f793e1d991bb Author: Matt Staples <staples255@gmail.com> Date: Mon Dec 5 07:57:19 2016 -0700 rtspsrc: Fix session cleanup when handling redirect on PLAY Redirect on PLAY wasn't doing the necessary session cleanup. Fixed by removing code from gst_rtspsrc_send that changed the state varable upon encountering a redirect. Better to let the redirect handlers in gst_rtspsrc_retrieve_sdp and gst_rtspsrc_play do their own state-dependent cleanup. https://bugzilla.gnome.org/show_bug.cgi?id=775543