aws: s3hlssink: Fix the name of the hlssink child element

It's easier to set child element properties if the name doesn't depend
on the factory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1061>
This commit is contained in:
Arun Raghavan 2023-01-24 13:02:14 -05:00 committed by GStreamer Marge Bot
parent ee8249eec7
commit ad3f1cf534

View file

@ -438,12 +438,12 @@ impl ObjectSubclass for S3HlsSink {
fn with_class(_klass: &Self::Class) -> Self {
/* Prefer hlssink3 here due to it's support for media playlist types */
let hlssink = match gst::ElementFactory::make("hlssink3")
.name("hlssink3")
.name("hlssink")
.build()
{
Ok(element) => element,
Err(_) => gst::ElementFactory::make("hlssink2")
.name("hlssink2")
.name("hlssink")
.build()
.expect("Could not find hlssink2. Need hlssink2 or hlssink3."),
};