summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-09-10 23:23:43 +1000
committerMatthew Waters <matthew@centricular.com>2018-09-21 19:36:52 +1000
commitf30c8c0c926dfbcb04a3ea302caa643e9f7d90e1 (patch)
treee679f5fe05fef69cd864c388fbdab2c1de6984c3
parentfb8f7c25deecb1412417d2baa82ec4b36f834bcb (diff)
sctpenc: don't require caps when requesting the pad
They can be set later
-rw-r--r--ext/sctp/gstsctpenc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/sctp/gstsctpenc.c b/ext/sctp/gstsctpenc.c
index 0ce411643..b8a3fd2f5 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))