dashsink: Make sure to use a non-NULL pad name when requesting a pad from splitmuxsink

If the caller passed in "audio_%u" instead of a concrete pad name into
gst_element_request_pad_simple() then the pad name will be NULL. In that case
use the pad template name for requesting the pad from splitmuxsink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8697>
This commit is contained in:
Sebastian Dröge 2025-03-26 15:32:05 +02:00 committed by GStreamer Marge Bot
parent 05347a3c03
commit fbdd1aa800

View File

@ -1066,6 +1066,9 @@ gst_dash_sink_request_new_pad (GstElement * element, GstPadTemplate * templ,
stream->adaptation_set_id = ADAPTATION_SET_ID_SUBTITLE; stream->adaptation_set_id = ADAPTATION_SET_ID_SUBTITLE;
} }
if (!split_pad_name)
split_pad_name = templ->name_template;
if (pad_name) if (pad_name)
stream->representation_id = g_strdup (pad_name); stream->representation_id = g_strdup (pad_name);
else else