[vlc-devel] [PATCH 7/7] demux:mkv: simplify the code

Denis Charmet typx at dinauz.org
Tue Mar 15 10:19:55 CET 2016


Hi,

On 2016-03-15 08:50, Steve Lhomme wrote:
> ---
>  modules/demux/mkv/demux.cpp | 10 +---------
>  modules/demux/mkv/demux.hpp |  3 ---
>  2 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
> index 5018439..1b6ce90 100644
> --- a/modules/demux/mkv/demux.cpp
> +++ b/modules/demux/mkv/demux.cpp
> @@ -654,7 +654,7 @@ bool demux_sys_t::PreloadLinked()
>      size_t i, j, ij = 0;
>      virtual_segment_c *p_seg;
> 
> -    p_current_segment = VirtualFromSegments( &opened_segments );
> +    p_current_segment = opened_segments.size() ? new

(std::nothrow)

> virtual_segment_c( opened_segments ) : NULL;
>      if ( !p_current_segment )
>          return false;
> 
> @@ -757,14 +757,6 @@ void demux_sys_t::FreeUnused()
>      }
>  }
> 
> -virtual_segment_c *demux_sys_t::VirtualFromSegments(
> std::vector<matroska_segment_c*> *p_segments ) const
> -{
> -    if ( p_segments->empty() )
> -        return NULL;
> -    virtual_segment_c *p_result = new virtual_segment_c( *p_segments 
> );
> -    return p_result;
> -}
> -
>  bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment )
>  {
>      if ( p_new_segment != NULL && p_new_segment != p_current_segment 
> )
> diff --git a/modules/demux/mkv/demux.hpp b/modules/demux/mkv/demux.hpp
> index 49c1c22..9310e11 100644
> --- a/modules/demux/mkv/demux.hpp
> +++ b/modules/demux/mkv/demux.hpp
> @@ -397,9 +397,6 @@ public:
> 
>      /* event */
>      event_thread_t *p_ev;
> -
> -protected:
> -    virtual_segment_c *VirtualFromSegments(
> std::vector<matroska_segment_c*> *p_segments ) const;
>  };

Regards,
-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre


More information about the vlc-devel mailing list