From 016a76ecb1172a9bbac152e2e7b96712e8b3da19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 2 Jun 2024 10:26:19 +0300 Subject: [PATCH] dtlssrtpenc: Don't crash if no pad name is provided when requesting a new pad It is mandatory to provide a valid pad name for dtlssrtpenc. Part-of: --- subprojects/gst-plugins-bad/ext/dtls/gstdtlssrtpenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/dtls/gstdtlssrtpenc.c b/subprojects/gst-plugins-bad/ext/dtls/gstdtlssrtpenc.c index 8653151c31..c3f1c581bd 100644 --- a/subprojects/gst-plugins-bad/ext/dtls/gstdtlssrtpenc.c +++ b/subprojects/gst-plugins-bad/ext/dtls/gstdtlssrtpenc.c @@ -396,6 +396,9 @@ gst_dtls_srtp_enc_request_new_pad (GstElement * element, g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL); g_return_val_if_fail (self->srtp_enc, NULL); + if (name == NULL) + return NULL; + if (templ == gst_element_class_get_pad_template (klass, "rtp_sink_%d")) { gchar *clocksync_name; GstElement *clocksync;