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 708689 - rtspconnection: RTSP watch is dispatched after closing the connection
rtspconnection: RTSP watch is dispatched after closing the connection
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-24 16:05 UTC by Ognyan Tonchev (redstar_)
Modified: 2013-09-24 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Unset input/output_stream after unreffing the GIOStream (962 bytes, patch)
2013-09-24 16:05 UTC, Ognyan Tonchev (redstar_)
committed Details | Review

Description Ognyan Tonchev (redstar_) 2013-09-24 16:05:35 UTC
Created attachment 255642 [details] [review]
Unset input/output_stream after unreffing the GIOStream

If one creates an RTSP watch for a connection and then calls rtsp_connection_close() the watch can still be dispatched.
The problem is that rtsp_connection_close() unreffs the giostream but watch->readsrc won't be unreffed until the last ref to the RTSP watch is dropped.

I am proposing a small patch which unsets input_stream and output_stream in gst_rtsp_connection_close() after dropping the reference to the object owning them - the GIOStream. This way the dispatch function will also notice that the connection has been closed and will not call message_received()
Comment 1 Sebastian Dröge (slomo) 2013-09-24 16:36:26 UTC
commit 8bd0e5de7adbc8b53da85c8884868e942d6e298d
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Tue Sep 24 16:26:37 2013 +0200

    rtspconnection: Unset input/output_stream after freeing the GIOStream
    
    watch->input_stream and watch->output_stream are owned by the GIOStream
    and should be unset after freeing the stream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708689