From f547482e7c631330e0fff4e7b56f4d95e2a46845 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 5 Aug 2010 10:32:53 +0300 Subject: [PATCH] info: take the timestamp a tick later The logging is not an atomic operation and because of the multi-threading we end up with out-of-order log lines. Tools that present the log-file should probably resort the lines. This change just takes the timestamp a bit closer to the actual logging. --- gst/gstinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 3126eef..f64d11e 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -914,15 +914,15 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, pid = getpid (); is_colored = gst_debug_is_colored (); - elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, - gst_util_get_timestamp ()); - if (object) { obj = gst_debug_print_object (object); } else { obj = g_strdup (""); } + elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, + gst_util_get_timestamp ()); + if (is_colored) { #ifndef G_OS_WIN32 /* colors, non-windows */ -- 2.7.4