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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7670>
This commit is contained in:
Philippe Normand 2024-10-15 15:57:06 +01:00 committed by GStreamer Marge Bot
parent 1c58b34345
commit 080b94b5e6

View file

@ -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);
if (sgroup->combiner) {
gst_element_unlink (sgroup->combiner, sgroup->parser);
}
gst_bin_remove ((GstBin *) ebin, sgroup->parser);
}