Skip to content

Commit

Permalink
SCTP: do not assert on the decoders pad, as the association might be
Browse files Browse the repository at this point in the history
disconnecting when on_receive() is called from usrsctplib

(cherry picked from commit b50426e)
  • Loading branch information
Tulio Beloqui authored and havardgraff committed Sep 27, 2023
1 parent 371c43f commit 72b10ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions subprojects/gst-plugins-bad/ext/sctp/gstsctpdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ get_pad_for_stream_id (GstSctpDec * self, guint16 stream_id)

if (state != GST_SCTP_ASSOCIATION_STATE_CONNECTED) {
GST_ERROR_OBJECT (self,
"The SCTP association must be established before a new stream can be created");
"The SCTP association must be established before a new stream can be created (state: %d)",
state);
return NULL;
}

Expand Down Expand Up @@ -750,7 +751,9 @@ on_receive (GstSctpAssociation * sctp_association, guint8 * buf,
GstBuffer *gstbuf;

src_pad = get_pad_for_stream_id (self, stream_id);
g_assert (src_pad);
/* If we don't have a src_pad it could mean the association is disconnecting */
if (!src_pad)
return;

GST_DEBUG_OBJECT (src_pad,
"Received incoming packet of size %" G_GSIZE_FORMAT
Expand Down

0 comments on commit 72b10ad

Please sign in to comment.