diff options
author | Célestin Marot <marotcelestin@gmail.com> | 2021-12-10 17:36:30 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2022-01-17 19:38:02 +0000 |
commit | f2638a486a80f22cff3e8bcaf07f90b4e7138fe4 (patch) | |
tree | d57c3fc521d13a5edc428de035e92cfb470168f4 | |
parent | 1343b9bff8fbd3d4b5da1833830239ce9782afc3 (diff) |
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/gst-plugins-good/-/merge_requests/1109>
-rw-r--r-- | gst/multifile/gstmultifilesrc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/multifile/gstmultifilesrc.c b/gst/multifile/gstmultifilesrc.c index d25f8bf73..4627a357f 100644 --- a/gst/multifile/gstmultifilesrc.c +++ b/gst/multifile/gstmultifilesrc.c @@ -342,6 +342,7 @@ gst_multi_file_src_set_property (GObject * object, guint prop_id, src->fps_n = -1; src->fps_d = -1; } + gst_caps_unref (new_caps); } break; case PROP_LOOP: |