From f30c8c0c926dfbcb04a3ea302caa643e9f7d90e1 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 10 Sep 2018 23:23:43 +1000 Subject: [PATCH] sctpenc: don't require caps when requesting the pad They can be set later --- ext/sctp/gstsctpenc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ext/sctp/gstsctpenc.c b/ext/sctp/gstsctpenc.c index 0ce4116432..b8a3fd2f58 100644 --- a/ext/sctp/gstsctpenc.c +++ b/ext/sctp/gstsctpenc.c @@ -421,11 +421,15 @@ gst_sctp_enc_request_new_pad (GstElement * element, GstPadTemplate * template, sctpenc_pad->stream_id = stream_id; sctpenc_pad->ppid = DEFAULT_SCTP_PPID; - get_config_from_caps (caps, &sctpenc_pad->ordered, &sctpenc_pad->reliability, - &sctpenc_pad->reliability_param, &new_ppid, &is_new_ppid); + if (caps) { + get_config_from_caps (caps, &sctpenc_pad->ordered, + &sctpenc_pad->reliability, &sctpenc_pad->reliability_param, &new_ppid, + &is_new_ppid); + + if (is_new_ppid) + sctpenc_pad->ppid = new_ppid; + } - if (is_new_ppid) - sctpenc_pad->ppid = new_ppid; sctpenc_pad->flushing = FALSE; if (!gst_pad_set_active (new_pad, TRUE))