[vlc-devel] [PATCH 2/2] mkv: Don't probe position for non finite elements

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 12 12:42:51 CEST 2019


LGTM

On 2019-08-12 12:09, Hugo Beauzée-Luyssen wrote:
> ---
>   modules/demux/mkv/Ebml_parser.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
> index 00b9efbb2d..b02c8572ed 100644
> --- a/modules/demux/mkv/Ebml_parser.cpp
> +++ b/modules/demux/mkv/Ebml_parser.cpp
> @@ -164,7 +164,7 @@ next:
>           if (i_max_read == 0)
>           {
>               /* check if the parent still has data to read */
> -            if ( mi_level > 1 &&
> +            if ( mi_level > 1 && m_el[mi_level-2]->IsFiniteSize() &&
>                    m_el[mi_level-1]->GetEndPosition() < m_el[mi_level-2]->GetEndPosition() )
>               {
>                   uint64 top = m_el[mi_level-2]->GetEndPosition();
> @@ -300,6 +300,7 @@ next:
>                        m_el[mi_level]->GetElementPosition() );
>   
>               if( mi_level >= 1 &&
> +                m_el[mi_level]->IsFiniteSize() && m_el[mi_level-1]->IsFiniteSize() &&
>                   m_el[mi_level]->GetElementPosition() >= m_el[mi_level-1]->GetEndPosition() )
>               {
>                   msg_Err(p_demux, "This element is outside its known parent... upping level");
> -- 
> 2.20.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list