[vlc-commits] demux: stop using xml_ReaderReset()
Rémi Denis-Courmont
git at videolan.org
Tue Apr 3 17:14:06 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 2 12:59:49 2018 +0300| [670bfe6c3765e96fc53ad36acce0762db90818db] | committer: Rémi Denis-Courmont
demux: stop using xml_ReaderReset()
This function was maybe significantly faster before the module probing
was optimized, but this is not so relevant anymore.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=670bfe6c3765e96fc53ad36acce0762db90818db
---
modules/demux/adaptive/xml/DOMParser.cpp | 4 +++-
modules/demux/playlist/wpl.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/demux/adaptive/xml/DOMParser.cpp b/modules/demux/adaptive/xml/DOMParser.cpp
index 648c14b348..dd848ec3a6 100644
--- a/modules/demux/adaptive/xml/DOMParser.cpp
+++ b/modules/demux/adaptive/xml/DOMParser.cpp
@@ -84,7 +84,9 @@ bool DOMParser::reset(stream_t *s)
return true;
delete root;
root = NULL;
- vlc_reader = xml_ReaderReset(vlc_reader, s);
+
+ xml_ReaderDelete(vlc_reader);
+ vlc_reader = xml_ReaderCreate(s, s);
return !!vlc_reader;
}
diff --git a/modules/demux/playlist/wpl.c b/modules/demux/playlist/wpl.c
index 1effebd2fe..67c77a47fd 100644
--- a/modules/demux/playlist/wpl.c
+++ b/modules/demux/playlist/wpl.c
@@ -315,7 +315,9 @@ int Import_WPL( vlc_object_t* p_this )
return VLC_EGENERIC;
}
- p_demux->p_sys = xml_ReaderReset( p_reader, p_demux->s );
+ xml_ReaderDelete( p_demux->p_sys );
+
+ p_demux->p_sys = xml_ReaderCreate( p_demux, p_demux->s );
vlc_stream_Delete( p_probestream );
if( unlikely( p_demux->p_sys == NULL ) )
return VLC_EGENERIC;
More information about the vlc-commits
mailing list