aws/s3hlssink: Use factory name when checking name of child element

Commit ad3f1cf fixed the name of hlssink child element to be the same
for hlssink2 and hlssink3. However, we rely on element name to return
boolean in case of hlssink3 or None in case of hlssink2 as the return
value of the delete-fragment closure.

Fix this by using the factory name instead of the element name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1076>
This commit is contained in:
Sanchayan Maity 2023-02-03 19:04:02 +05:30
parent 5506f8001e
commit 41aa1e51da

View file

@ -735,7 +735,7 @@ impl ObjectImpl for S3HlsSink {
// The signature on delete-fragment signal is different for
// hlssink2 and hlssink3.
if self_.hlssink.name().contains("hlssink3") {
if self_.hlssink.factory().unwrap().name().contains("hlssink3") {
if res.is_ok() {
Some(true.to_value())
} else {