encodebasebin: Make profile ownership explicit in StreamGroup

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9167>
This commit is contained in:
Philippe Normand 2025-06-04 12:41:35 +02:00 committed by GStreamer Marge Bot
parent 3719b5b616
commit 1d20fd15b0

View File

@ -1539,7 +1539,7 @@ _create_stream_group (GstEncodeBaseBin * ebin, GstEncodingProfile * sprof,
sgroup = g_new0 (StreamGroup, 1);
sgroup->ebin = ebin;
sgroup->profile = sprof;
sgroup->profile = gst_object_ref (sprof);
/* NOTE for people reading this code:
*
@ -2564,6 +2564,8 @@ stream_group_free (GstEncodeBaseBin * ebin, StreamGroup * sgroup)
if (sgroup->outfilter)
gst_bin_remove ((GstBin *) ebin, sgroup->outfilter);
gst_clear_object (&sgroup->profile);
g_free (sgroup);
}