[vlc-commits] messages: temporarily clear logger for quiet mode
Rémi Denis-Courmont
git at videolan.org
Wed Feb 20 19:06:42 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 20 18:02:52 2019 +0200| [cd029f8eff3acfe13868854768b7eee098e1c8ab] | committer: Rémi Denis-Courmont
messages: temporarily clear logger for quiet mode
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd029f8eff3acfe13868854768b7eee098e1c8ab
---
modules/codec/ttml/substtml.c | 5 ++++-
modules/demux/adaptive/xml/DOMParser.cpp | 6 +++---
modules/demux/playlist/wpl.c | 6 +++---
src/video_output/vout_spuregion_helper.h | 5 ++++-
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 4c8240fefe..ac6aa5dd3d 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -1171,8 +1171,10 @@ static picture_t * picture_CreateFromPNG( decoder_t *p_dec,
memcpy( p_block->p_buffer, p_data, i_data );
picture_t *p_pic = NULL;
+ struct vlc_logger *logger = p_dec->obj.logger;
int i_flags = p_dec->obj.flags;
- p_dec->obj.flags |= OBJECT_FLAGS_NOINTERACT|OBJECT_FLAGS_QUIET;
+ p_dec->obj.logger = NULL;
+ p_dec->obj.flags |= OBJECT_FLAGS_NOINTERACT;
image_handler_t *p_image = image_HandlerCreate( p_dec );
if( p_image )
{
@@ -1181,6 +1183,7 @@ static picture_t * picture_CreateFromPNG( decoder_t *p_dec,
}
else block_Release( p_block );
p_dec->obj.flags = i_flags;
+ p_dec->obj.logger = logger;
es_format_Clean( &es_in );
video_format_Clean( &fmt_out );
diff --git a/modules/demux/adaptive/xml/DOMParser.cpp b/modules/demux/adaptive/xml/DOMParser.cpp
index dd848ec3a6..c093089f22 100644
--- a/modules/demux/adaptive/xml/DOMParser.cpp
+++ b/modules/demux/adaptive/xml/DOMParser.cpp
@@ -66,11 +66,11 @@ bool DOMParser::parse (bool b)
if(!vlc_reader && !(vlc_reader = xml_ReaderCreate(stream, stream)))
return false;
- const int i_flags = vlc_reader->obj.flags;
+ struct vlc_logger *const logger = vlc_reader->obj.logger;
if(!b)
- vlc_reader->obj.flags |= OBJECT_FLAGS_QUIET;
+ vlc_reader->obj.logger = NULL;
root = processNode(b);
- vlc_reader->obj.flags = i_flags;
+ vlc_reader->obj.logger = logger;
if ( root == NULL )
return false;
diff --git a/modules/demux/playlist/wpl.c b/modules/demux/playlist/wpl.c
index 67c77a47fd..e9496fd140 100644
--- a/modules/demux/playlist/wpl.c
+++ b/modules/demux/playlist/wpl.c
@@ -302,11 +302,11 @@ int Import_WPL( vlc_object_t* p_this )
}
p_demux->p_sys = p_reader;
- const int i_flags = p_reader->obj.flags;
- p_reader->obj.flags |= OBJECT_FLAGS_QUIET;
+ struct vlc_logger *const logger = p_reader->obj.logger;
+ p_reader->obj.logger = NULL;
const char* psz_name;
int type = xml_ReaderNextNode( p_reader, &psz_name );
- p_reader->obj.flags = i_flags;
+ p_reader->obj.logger = logger;
if ( type != XML_READER_STARTELEM || strcasecmp( psz_name, "smil" ) )
{
msg_Err( p_demux, "Invalid WPL playlist. Root element should have been <smil>" );
diff --git a/src/video_output/vout_spuregion_helper.h b/src/video_output/vout_spuregion_helper.h
index c547d3a6f4..f94cce68ac 100644
--- a/src/video_output/vout_spuregion_helper.h
+++ b/src/video_output/vout_spuregion_helper.h
@@ -67,8 +67,10 @@ spuregion_CreateFromPicture( vlc_object_t *p_this, video_format_t *p_fmt,
const char *psz_uri )
{
picture_t *p_pic = NULL;
+ struct vlc_logger *logger = p_this->obj.logger;
int i_flags = p_this->obj.flags;
- p_this->obj.flags |= OBJECT_FLAGS_NOINTERACT|OBJECT_FLAGS_QUIET;
+ p_this->obj.logger = NULL;
+ p_this->obj.flags |= OBJECT_FLAGS_NOINTERACT;
image_handler_t *p_image = image_HandlerCreate( p_this );
if( p_image )
{
@@ -76,6 +78,7 @@ spuregion_CreateFromPicture( vlc_object_t *p_this, video_format_t *p_fmt,
image_HandlerDelete( p_image );
}
p_this->obj.flags = i_flags;
+ p_this->obj.logger = logger;
if(!p_pic)
return NULL;
More information about the vlc-commits
mailing list