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>
This commit is contained in:
Yoann Lopes
2014-03-20 19:20:24 +01:00
committed by The Qt Project
parent 60ba0afbde
commit 023c6ebcb9
20 changed files with 134 additions and 41 deletions

View File

@@ -191,10 +191,14 @@ GstEncodingContainerProfile *CameraBinRecorder::videoProfile()
GstEncodingProfile *audioProfile = m_session->audioEncodeControl()->createProfile();
GstEncodingProfile *videoProfile = m_session->videoEncodeControl()->createProfile();
if (audioProfile)
gst_encoding_container_profile_add_profile(containerProfile, audioProfile);
if (videoProfile)
gst_encoding_container_profile_add_profile(containerProfile, videoProfile);
if (audioProfile) {
if (!gst_encoding_container_profile_add_profile(containerProfile, audioProfile))
gst_encoding_profile_unref(audioProfile);
}
if (videoProfile) {
if (!gst_encoding_container_profile_add_profile(containerProfile, videoProfile))
gst_encoding_profile_unref(videoProfile);
}
}
return containerProfile;