diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2020-02-25 21:03:06 +0530 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-02-26 03:23:20 +0000 |
commit | 54d8360baa1698b5a4c075df83c84037d2d6b6ae (patch) | |
tree | ee0377b6e08781ca2c9d702a493b546b5fb4d39a /gst/transcode | |
parent | 91a033a85e2b3016cf978920a843607327a422bc (diff) | |
download | gstreamer-plugins-bad-54d8360baa1698b5a4c075df83c84037d2d6b6ae.tar.gz |
transcodebin: fix caps leak
encodecaps was leaked if the profile has restrictions.
Diffstat (limited to 'gst/transcode')
-rw-r--r-- | gst/transcode/gsttranscodebin.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/transcode/gsttranscodebin.c b/gst/transcode/gsttranscodebin.c index 51812f41d..e69897a42 100644 --- a/gst/transcode/gsttranscodebin.c +++ b/gst/transcode/gsttranscodebin.c @@ -293,14 +293,16 @@ make_decodebin (GstTranscodeBin * self) gst_encoding_container_profile_get_profiles (GST_ENCODING_CONTAINER_PROFILE (self->profile)); tmp; tmp = tmp->next) { - GstCaps *encodecaps = gst_encoding_profile_get_format (tmp->data); GstCaps *restrictions = gst_encoding_profile_get_restriction (tmp->data); - if (!restrictions) + if (!restrictions) { + GstCaps *encodecaps = gst_encoding_profile_get_format (tmp->data); + gst_caps_append (decodecaps, encodecaps); - else + } else { gst_caps_unref (restrictions); + } } } g_object_set (self->decodebin, "caps", decodecaps, NULL); |