diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-03-20 19:20:24 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-21 19:16:09 +0100 |
commit | 023c6ebcb9d990042f0e9a750fd6238d22001022 (patch) | |
tree | b98e068ccbdae0a587179d657541cc857c9daf0c /src/plugins/gstreamer/camerabin/camerabincontainer.cpp | |
parent | 60ba0afbde0ef53a12afb6c755ca6fd64aabf5da (diff) |
GStreamer: fix memory leaks.
Many GStreamer objects were not properly managed or never released.
Change-Id: I38b3854e8b9e2264b5b647f331d3bb16b886e2d6
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/plugins/gstreamer/camerabin/camerabincontainer.cpp')
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabincontainer.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/gstreamer/camerabin/camerabincontainer.cpp b/src/plugins/gstreamer/camerabin/camerabincontainer.cpp index 4c2a3bda9..44eb36818 100644 --- a/src/plugins/gstreamer/camerabin/camerabincontainer.cpp +++ b/src/plugins/gstreamer/camerabin/camerabincontainer.cpp @@ -124,11 +124,15 @@ GstEncodingContainerProfile *CameraBinContainer::createProfile() caps = gst_caps_from_string(format.toLatin1()); } - return (GstEncodingContainerProfile *)gst_encoding_container_profile_new( - "camerabin2_profile", - (gchar *)"custom camera profile", - caps, - NULL); //preset + GstEncodingContainerProfile *profile = (GstEncodingContainerProfile *)gst_encoding_container_profile_new( + "camerabin2_profile", + (gchar *)"custom camera profile", + caps, + NULL); //preset + + gst_caps_unref(caps); + + return profile; } /*! |