[vlc-commits] wpl/ttml: hide xml errors when probing

Francois Cartegnie git at videolan.org
Tue Nov 3 13:52:12 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov  3 13:51:39 2015 +0100| [9982a160254035b6089e0de0e61b0b90b70ce0f9] | committer: Francois Cartegnie

wpl/ttml: hide xml errors when probing

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

 modules/demux/playlist/wpl.c |    3 +++
 modules/demux/ttml.c         |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/modules/demux/playlist/wpl.c b/modules/demux/playlist/wpl.c
index 52da7a0..66fc2e3 100644
--- a/modules/demux/playlist/wpl.c
+++ b/modules/demux/playlist/wpl.c
@@ -202,8 +202,11 @@ int Import_WPL( vlc_object_t* p_this )
         return VLC_EGENERIC;
     }
 
+    const int i_flags = p_sys->p_reader->i_flags;
+    p_sys->p_reader->i_flags |= OBJECT_FLAGS_QUIET;
     const char* psz_name;
     int type = xml_ReaderNextNode( p_sys->p_reader, &psz_name );
+    p_sys->p_reader->i_flags = i_flags;
     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/modules/demux/ttml.c b/modules/demux/ttml.c
index f58e65b..4eca4bb 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -493,8 +493,11 @@ static int Open( vlc_object_t* p_this )
         return VLC_EGENERIC;
     }
 
+    const int i_flags = p_sys->p_reader->i_flags;
+    p_sys->p_reader->i_flags |= OBJECT_FLAGS_QUIET;
     const char* psz_name;
     int i_type = xml_ReaderNextNode( p_sys->p_reader, &psz_name );
+    p_sys->p_reader->i_flags = i_flags;
     if ( i_type != XML_READER_STARTELEM || ( strcmp( psz_name, "tt" ) && strcmp( psz_name, "tt:tt" ) ) )
     {
         Close( p_demux );



More information about the vlc-commits mailing list