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.
This commit is contained in:
Tim-Philipp Müller 2007-05-09 10:01:35 +00:00
parent b7e503a7f9
commit cb67757934
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2007-05-09 Tim-Philipp Müller <tim at centricular dot net>
* 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 <ensonic@users.sf.net>
* docs/gst/Makefile.am:

View file

@ -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);

View file

@ -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);