gst-plugins-good: tests: fix some leaks and remove files when done in qtmux test

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 4 10:06:26 PST 2012


Module: gst-plugins-good
Branch: master
Commit: 12ff707854922305992564476ba0964d7c097bfe
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=12ff707854922305992564476ba0964d7c097bfe

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Wed Jan  4 17:59:55 2012 +0000

tests: fix some leaks and remove files when done in qtmux test

---

 tests/check/elements/qtmux.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/check/elements/qtmux.c b/tests/check/elements/qtmux.c
index 484296b..a9364c9 100644
--- a/tests/check/elements/qtmux.c
+++ b/tests/check/elements/qtmux.c
@@ -28,6 +28,8 @@
 #include <unistd.h>
 #endif
 
+#include <glib/gstdio.h>
+
 #include <gst/check/gstcheck.h>
 #include <gst/pbutils/encoding-profile.h>
 
@@ -614,8 +616,7 @@ test_mp3_enc_base_init (gpointer klass)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
 
-  gst_element_class_add_static_pad_template (element_class,
-      &sink_template);
+  gst_element_class_add_static_pad_template (element_class, &sink_template);
   gst_element_class_add_static_pad_template (element_class, &src_template);
 
   gst_element_class_set_details_simple (element_class, "MPEG1 Audio Encoder",
@@ -838,7 +839,12 @@ test_average_bitrate_custom (const gchar * elementname,
         (guint) gst_util_uint64_scale_round ((guint64) total_bytes,
         (guint64) 8 * GST_SECOND, (guint64) total_duration);
     fail_unless (bitrate == expected);
+    gst_tag_list_free (taglist);
   }
+
+  /* delete file */
+  g_unlink (location);
+  g_free (location);
 }
 
 GST_START_TEST (test_average_bitrate)



More information about the gstreamer-commits mailing list