[vlc-commits] messages: clear object logger for quiet mode

Rémi Denis-Courmont git at videolan.org
Wed Feb 20 19:06:41 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 19 20:55:07 2019 +0200| [fbb1882d15e884f966a0afee5a226125ae22b82a] | committer: Rémi Denis-Courmont

messages: clear object logger for quiet mode

Set the logger to NULL instead of using the quiet flag.

Thread-safety consideration remain similar: while disabling logging,
no other threads shall be using the object for logging. Previously,
no other threads shall have been using the object for logging or
user interaction (as flags are shared by dialog and message systems).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbb1882d15e884f966a0afee5a226125ae22b82a
---

 modules/demux/ttml.c                   | 2 +-
 modules/stream_out/renderer_common.cpp | 3 ++-
 src/input/input.c                      | 5 ++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 02b7cc7d83..0579dbe1a6 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -488,7 +488,7 @@ int tt_OpenDemux( vlc_object_t* p_this )
         goto error;
 
 #ifndef TTML_DEMUX_DEBUG
-    p_sys->p_reader->obj.flags |= OBJECT_FLAGS_QUIET;
+    p_sys->p_reader->obj.logger = NULL;
 #endif
 
     if( ReadTTML( p_demux ) != VLC_SUCCESS )
diff --git a/modules/stream_out/renderer_common.cpp b/modules/stream_out/renderer_common.cpp
index 77b6c8c747..729858d16a 100644
--- a/modules/stream_out/renderer_common.cpp
+++ b/modules/stream_out/renderer_common.cpp
@@ -107,7 +107,8 @@ GetVencOption( sout_stream_t *p_stream, std::vector<vlc_fourcc_t> codecs,
 
             if( p_sout_test != NULL )
             {
-                p_sout_test->obj.flags |= OBJECT_FLAGS_QUIET|OBJECT_FLAGS_NOINTERACT;
+                p_sout_test->obj.logger = NULL;
+                p_sout_test->obj.flags |= OBJECT_FLAGS_NOINTERACT;
 
                 es_format_t fmt;
                 es_format_InitFromVideo( &fmt, p_vid );
diff --git a/src/input/input.c b/src/input/input.c
index 1e175d5492..a9ffbec1be 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -398,7 +398,10 @@ static input_thread_t *Create( vlc_object_t *p_parent,
             p_item->i_preparse_depth = -1;
     }
     else
-        p_input->obj.flags |= OBJECT_FLAGS_QUIET | OBJECT_FLAGS_NOINTERACT;
+    {
+        p_input->obj.logger = NULL;
+        p_input->obj.flags |= OBJECT_FLAGS_NOINTERACT;
+    }
 
     /* Make sure the interaction option is honored */
     if( !var_InheritBool( p_input, "interact" ) )



More information about the vlc-commits mailing list