From: Tim-Philipp Müller Date: Wed, 9 May 2007 10:01:35 +0000 (+0000) Subject: tests/benchmarks/: Set a good example and don't leak messages. X-Git-Tag: RELEASE-0_10_13~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb67757934dd63e6b818be0577b0dbefdac59cb3;p=platform%2Fupstream%2Fgstreamer.git tests/benchmarks/: Set a good example and don't leak messages. Original commit message from CVS: * tests/benchmarks/complexity.c: (main): * tests/benchmarks/mass-elements.c: (main): Set a good example and don't leak messages. --- diff --git a/ChangeLog b/ChangeLog index 82a1fc2..24f5207 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-09 Tim-Philipp Müller + + * tests/benchmarks/complexity.c: (main): + * tests/benchmarks/mass-elements.c: (main): + Set a good example and don't leak messages. + 2007-05-06 Stefan Kost * docs/gst/Makefile.am: diff --git a/tests/benchmarks/complexity.c b/tests/benchmarks/complexity.c index c72b5d6..c1f2670 100644 --- a/tests/benchmarks/complexity.c +++ b/tests/benchmarks/complexity.c @@ -38,6 +38,7 @@ gst_get_current_time (void) gint main (gint argc, gchar * argv[]) { + GstMessage *msg; GstElement *pipeline, *src, *e; GSList *saved_src_list, *src_list, *new_src_list; guint complexity_order, n_elements, i, j, max_this_level; @@ -120,9 +121,10 @@ main (gint argc, gchar * argv[]) GST_TIME_ARGS (end - start)); start = gst_get_current_time (); - gst_bus_poll (gst_element_get_bus (pipeline), + msg = gst_bus_poll (gst_element_get_bus (pipeline), GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); end = gst_get_current_time (); + gst_message_unref (msg); g_print ("%" GST_TIME_FORMAT " - putting %u buffers through\n", GST_TIME_ARGS (end - start), BUFFER_COUNT); diff --git a/tests/benchmarks/mass-elements.c b/tests/benchmarks/mass-elements.c index 91df2c9..11839fd 100644 --- a/tests/benchmarks/mass-elements.c +++ b/tests/benchmarks/mass-elements.c @@ -38,6 +38,7 @@ gst_get_current_time (void) gint main (gint argc, gchar * argv[]) { + GstMessage *msg; GstElement *pipeline, *src, *sink, *current, *last; guint i, buffers = BUFFER_COUNT, identities = IDENTITY_COUNT; GstClockTime start, end; @@ -98,9 +99,10 @@ main (gint argc, gchar * argv[]) GST_TIME_ARGS (end - start)); start = gst_get_current_time (); - gst_bus_poll (gst_element_get_bus (pipeline), + msg = gst_bus_poll (gst_element_get_bus (pipeline), GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); end = gst_get_current_time (); + gst_message_unref (msg); g_print ("%" GST_TIME_FORMAT " - putting %u buffers through\n", GST_TIME_ARGS (end - start), buffers);