GNOME Bugzilla – Bug 796893
splitmuxsink: Reference cycle between queue/queue pads if not explicitly removing pads
Last modified: 2018-08-14 16:29:58 UTC
Problem is that the multiqueue context has a strong reference to the queue and its pads, while at the same time both pads have a reference to the multiqueue context via the pad probe data. If pads are explictly removed from splitmuxsink the pad probes are removed and the cycle is broken, but if it's all just unreffed then the cycle stays and things are leaked.
*** Bug 796920 has been marked as a duplicate of this bug. ***
Test case from bug 796920: $ GST_TRACERS="leaks" GST_DEBUG="GST_TRACER:7" GST_DEBUG_COLOR_MODE=off gst-launch-1.0 videotestsrc num-buffers=200 ! openh264enc ! h264parse ! splitmuxsink location="output.mp4"
This fixes it here: commit f8076e208bc940ed76d7cb58e11a31fc4b813957 Author: Jan Schmidt <jan@centricular.com> Date: Wed Aug 15 02:10:25 2018 +1000 splitmuxsink: Fix reference counting loop The stream context was holding a reference to the internal queue and pads, with pad probes that were in turn holding references to the stream context. This lead to a leak if the request pads weren't explicitly released. https://bugzilla.gnome.org/show_bug.cgi?id=796893