After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775543 - rtspsrc: redirect-on-play skips stream cleanup and TEARDOWN
rtspsrc: redirect-on-play skips stream cleanup and TEARDOWN
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Windows
: Normal normal
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-03 00:43 UTC by Matt Staples
Modified: 2016-12-07 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow cleanup on redirect by leaving state changes to the redirect handlers (372 bytes, patch)
2016-12-03 00:43 UTC, Matt Staples
needs-work Details | Review
change to allow session cleanup upon redirect-on-play (970 bytes, patch)
2016-12-05 16:09 UTC, Matt Staples
committed Details | Review

Description Matt Staples 2016-12-03 00:43:37 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 1 Sebastian Dröge (slomo) 2016-12-05 09:33:45 UTC
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.
Comment 2 Matt Staples 2016-12-05 16:09:02 UTC
Created attachment 341410 [details] [review]
change to allow session cleanup upon redirect-on-play
Comment 3 Sebastian Dröge (slomo) 2016-12-05 16:24:23 UTC
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