[vlc-devel] [PATCH] MKV : Always export CodecPrivate (as the ES' extradata) if it is present.

Laurent Aimar fenrir at elivagar.org
Thu Jul 1 20:13:51 CEST 2010


On Thu, Jul 01, 2010 at 08:43:43PM +0530, Jai Menon wrote:
> ---
>  modules/demux/mkv/matroska_segment.cpp |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
> index 04e4a22..aed2cfa 100644
> --- a/modules/demux/mkv/matroska_segment.cpp
> +++ b/modules/demux/mkv/matroska_segment.cpp
> @@ -1164,6 +1164,10 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
>          {
>              p_tk->fmt.i_priority = 1000;
>          }
> +        // Export CodecPrivate if it is present and the ES format's
> +        // extradata field hasn't been populated yet.
> +        if( !p_tk->fmt.p_extra && p_tk->i_extra_data )
> +            fill_extra_data( p_tk );
 It is not always valid.

 For example, with V_MS/VFW/FOURCC, p_tk->i_extra_data will contain
data but may leave p_tk->fmt.i_extra empty. In this case, filling
it with p_tk->i_extra_data is wrong.
 I haven't checked every other cases, but it may not be limited to
V_MS/VFW/FOURCC.

-- 
fenrir



More information about the vlc-devel mailing list