summaryrefslogtreecommitdiff
path: root/ext/sctp/gstsctpdec.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-01-30 16:06:09 +0200
committerSebastian Dröge <sebastian@centricular.com>2020-01-30 16:07:48 +0200
commitfa0a233fa7237ce6cd26f6408791fbc22f67a2e2 (patch)
tree292aabcd5714631749fedb1c95daff4449d7696e /ext/sctp/gstsctpdec.c
parentbff33f3b219b12e6277f4ee12b920ab3774658e0 (diff)
downloadgstreamer-plugins-bad-fa0a233fa7237ce6cd26f6408791fbc22f67a2e2.tar.gz
sctp: Make receive/packetout callbacks thread-safe
Diffstat (limited to 'ext/sctp/gstsctpdec.c')
-rw-r--r--ext/sctp/gstsctpdec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/sctp/gstsctpdec.c b/ext/sctp/gstsctpdec.c
index 121f738e5..08551ad25 100644
--- a/ext/sctp/gstsctpdec.c
+++ b/ext/sctp/gstsctpdec.c
@@ -474,7 +474,7 @@ configure_association (GstSctpDec * self)
"local-port", G_BINDING_SYNC_CREATE);
gst_sctp_association_set_on_packet_received (self->sctp_association,
- on_receive, self);
+ on_receive, gst_object_ref (self), gst_object_unref);
return TRUE;
error:
@@ -688,9 +688,8 @@ static void
sctpdec_cleanup (GstSctpDec * self)
{
if (self->sctp_association) {
- /* FIXME: make this threadsafe */
- /* gst_sctp_association_set_on_packet_received (self->sctp_association, NULL,
- NULL); */
+ gst_sctp_association_set_on_packet_received (self->sctp_association, NULL,
+ NULL, NULL);
g_signal_handler_disconnect (self->sctp_association,
self->signal_handler_stream_reset);
stop_all_srcpad_tasks (self);