diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2017-04-21 10:01:15 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-06-05 18:22:31 -0400 |
commit | 484306ea21db9086d860e3e21ec7b41174c9cf15 (patch) | |
tree | 4c6408008f47bae5fce4f8c8ddd422869df25244 | |
parent | b8751b8ee7cd2a8fab2a61a79443a8d287412c8d (diff) | |
download | farstream-484306ea21db9086d860e3e21ec7b41174c9cf15.tar.gz |
rtp: test the session conference property before using it
This may happen when the rtp session object is calling its dispose
function in another thread. The disposed flag is set, and it prevents
the fs_rtp_session_get_property() function to return its conference
object.
https://bugs.freedesktop.org/show_bug.cgi?id=101169
-rw-r--r-- | gst/fsrtpconference/fs-rtp-stream.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c index b2d59f2c..1ef6b2e8 100644 --- a/gst/fsrtpconference/fs-rtp-stream.c +++ b/gst/fsrtpconference/fs-rtp-stream.c @@ -826,6 +826,11 @@ _local_candidates_prepared (FsStreamTransmitter *stream_transmitter, g_object_get (session, "conference", &conf, NULL); + if (!conf) { + g_object_unref (session); + return; + } + gst_element_post_message (conf, gst_message_new_element (GST_OBJECT (conf), gst_structure_new ("farstream-local-candidates-prepared", @@ -853,6 +858,11 @@ _new_active_candidate_pair ( g_object_get (session, "conference", &conf, NULL); + if (!conf) { + g_object_unref (session); + return; + } + gst_element_post_message (conf, gst_message_new_element (GST_OBJECT (conf), gst_structure_new ("farstream-new-active-candidate-pair", @@ -881,6 +891,11 @@ _new_local_candidate ( g_object_get (session, "conference", &conf, NULL); + if (!conf) { + g_object_unref (session); + return; + } + gst_element_post_message (conf, gst_message_new_element (GST_OBJECT (conf), gst_structure_new ("farstream-new-local-candidate", @@ -929,6 +944,11 @@ _state_changed (FsStreamTransmitter *stream_transmitter, g_object_get (session, "conference", &conf, NULL); + if (!conf) { + g_object_unref (session); + return; + } + gst_element_post_message (conf, gst_message_new_element (GST_OBJECT (conf), gst_structure_new ("farstream-component-state-changed", |