[Bug 797314] New: in some cases, no log can be printed

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Oct 21 03:39:00 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797314

            Bug ID: 797314
           Summary: in some cases, no log can be printed
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: major
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: stephen.xiao.zh at outlook.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Below text is my local modify. It have already been tested in my environment.
I can't understand what the code "(level) <= _gst_debug_min)"'s purpose.

diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index 6816e9e..00c4772 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -635,7 +635,7 @@ GST_API GstDebugLevel            _gst_debug_min;
  */
 #ifdef G_HAVE_ISO_VARARGS
 #define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{          \
-  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {   
                                        \
+  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) >= _gst_debug_min)) {   
                                        \
     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__,   \
         (GObject *) (object), __VA_ARGS__);                            \
   }                                                                    \
@@ -643,7 +643,7 @@ GST_API GstDebugLevel            _gst_debug_min;
 #else /* G_HAVE_GNUC_VARARGS */
 #ifdef G_HAVE_GNUC_VARARGS
 #define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{      \
-  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {   
                                        \
+  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) >= _gst_debug_min)) {   
                                        \
     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__,   \
         (GObject *) (object), ##args );                                       
\
   }                                                                    \
@@ -653,7 +653,7 @@ static inline void
 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
     GstDebugLevel level, gpointer object, const char *format, va_list varargs)
 {
-  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {
+  if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) >= _gst_debug_min)) {
     gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
         varargs);
   }
@@ -677,7 +677,7 @@ GST_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel
level,
  * with the other doc chunks below though. */
 #define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{      
\
     if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= GST_LEVEL_MAX &&                    \
-                   GST_LEVEL_MEMDUMP <= _gst_debug_min)) {                   \
+                   GST_LEVEL_MEMDUMP >= _gst_debug_min)) {                   \
     _gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__,            
\
         (GObject *) (object), (msg), (data), (length));                      
\
   }                                                                          
\

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list