ges: smart-mixer: Avoid video freeze on NLE stack changes
authorThibault Saunier <tsaunier@igalia.com>
Thu, 12 Jan 2023 14:52:21 +0000 (11:52 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 17 Jan 2023 20:10:19 +0000 (20:10 +0000)
Since we support "nested compositors"[0] we were not finalizing the pads_infos
and thus not releasing the mixer pad on stack change, meaning that
the following stacks were never prerolling.

[0] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>

subprojects/gst-editing-services/ges/ges-smart-video-mixer.c

index f3af748..758d368 100644 (file)
@@ -341,6 +341,8 @@ _release_pad (GstElement * element, GstPad * pad)
   LOCK (element);
   g_hash_table_remove (GES_SMART_MIXER (element)->pads_infos, pad);
   g_hash_table_remove (GES_SMART_MIXER (element)->pads_infos, info->mixer_pad);
+  g_hash_table_remove (GES_SMART_MIXER (element)->pads_infos,
+      info->real_mixer_pad);
   peer = gst_pad_get_peer (pad);
   if (peer) {
     gst_pad_unlink (peer, pad);