vlc/vlc-3.0 | branch: master | Alexandre Janniaux <[email protected]> | Thu Jun 18 11:39:53 2020 +0200| [30b3534ff0a326b61c1b75439f72e2982bb8ba23] | committer: Steve Lhomme
mkv: ebml_dispatcher: fix ebmlid check std::lower_bound doesn't return an iterator to the std::end value if the element is not found, but like its name says, to the first value that is greater or equal than the value wanted, meaning it could be the next one if no processor has been bound to the ebml id sent to this dispatcher. Instead of asserting, it should really be checking whether the ebmlid matches. Regression from c764461180d70d1c9fa81e72cd7ad9d9b289eea6. (cherry picked from commit 20ed34f45803c1171c7219d72a4284fa1d0d7852) Signed-off-by: Steve Lhomme <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=30b3534ff0a326b61c1b75439f72e2982bb8ba23 --- modules/demux/mkv/Ebml_dispatcher.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/demux/mkv/Ebml_dispatcher.hpp b/modules/demux/mkv/Ebml_dispatcher.hpp index a5df19eccc..c58e5801ce 100644 --- a/modules/demux/mkv/Ebml_dispatcher.hpp +++ b/modules/demux/mkv/Ebml_dispatcher.hpp @@ -88,9 +88,11 @@ namespace { _processors.begin(), cit_end, eb ); - if (cit != cit_end) + /* Check that the processor is valid and unique. */ + if (cit != cit_end && + cit->p_ebmlid == eb.p_ebmlid && + (*cit->p_ebmlid == *eb.p_ebmlid)) { - assert(cit->p_ebmlid == eb.p_ebmlid || (*cit->p_ebmlid == *eb.p_ebmlid)); cit->callback (element, payload); return true; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
