multifilesrc: fix caps leak
authorCélestin Marot <marotcelestin@gmail.com>
Fri, 10 Dec 2021 16:36:30 +0000 (17:36 +0100)
committerCélestin Marot <marotcelestin@gmail.com>
Fri, 10 Dec 2021 17:34:57 +0000 (18:34 +0100)
commitf509578de5dd1f39bf5eed717f91be85c6a5f85b
treec1d64c4ac719fdf733a5c709169bcfcf8e187110
parente8c923ebdeb1760f6a0593400aa19eeb0efd8d87
multifilesrc: fix caps leak

since `gst_caps_replace()` and `gst_pad_set_caps()` both ref the caps and neither of them takes the ownership of the caps -> it must be unreffed in `gst_multi_file_src_set_property()`

to test the leak (on Unix): `echo coucou > /tmp/file.txt && GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7" gst-launch-1.0 multifilesrc location=/tmp/file.txt caps='txt' ! fakesink`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1436>
subprojects/gst-plugins-good/gst/multifile/gstmultifilesrc.c