From 080b94b5e64e9f866c0ac90e78b246faac57f924 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Tue, 15 Oct 2024 15:57:06 +0100 Subject: [PATCH] encodebasebin: Fix parser cleanup When removing the parser from the stream group, it might not be linked to a combiner so this needs to be checked. Part-of: --- subprojects/gst-plugins-base/gst/encoding/gstencodebasebin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/encoding/gstencodebasebin.c b/subprojects/gst-plugins-base/gst/encoding/gstencodebasebin.c index c6f8712c6b..cf1cfe4657 100644 --- a/subprojects/gst-plugins-base/gst/encoding/gstencodebasebin.c +++ b/subprojects/gst-plugins-base/gst/encoding/gstencodebasebin.c @@ -2431,7 +2431,9 @@ stream_group_free (GstEncodeBaseBin * ebin, StreamGroup * sgroup) if (sgroup->parser) { gst_element_set_state (sgroup->parser, GST_STATE_NULL); gst_element_unlink (sgroup->parser, sgroup->outfilter); - gst_element_unlink (sgroup->combiner, sgroup->parser); + if (sgroup->combiner) { + gst_element_unlink (sgroup->combiner, sgroup->parser); + } gst_bin_remove ((GstBin *) ebin, sgroup->parser); }