[vlc-commits] commit: MKV : Export MPEG[12] sequence header present in CodecPrivate as extradata. (Jai Menon )

git at videolan.org git at videolan.org
Sat Jul 3 13:58:23 CEST 2010


vlc/vlc-1.1 | branch: master | Jai Menon <jmenon86 at gmail.com> | Thu Jul  1 20:09:40 2010 +0530| [faedf23ec283f83e8972bc073e55f80f46810c57] | committer: Jean-Baptiste Kempf 

MKV : Export MPEG[12] sequence header present in CodecPrivate as extradata.

This fixes files where the muxer doesn't store sequence headers
as part of the stream.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=faedf23ec283f83e8972bc073e55f80f46810c57
---

 modules/demux/mkv/matroska_segment.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 37e8f10..bc32dd6 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -822,6 +822,11 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
                  !strcmp( tracks[i_track]->psz_codec, "V_MPEG2" ) )
         {
             tracks[i_track]->fmt.i_codec = VLC_CODEC_MPGV;
+            if( tracks[i_track]->fmt.i_extra > 0 )
+            {
+                tracks[i_track]->fmt.p_extra = xmalloc( tracks[i_track]->i_extra_data );
+                memcpy( tracks[i_track]->fmt.p_extra,tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
+            }
         }
         else if( !strncmp( tracks[i_track]->psz_codec, "V_THEORA", 8 ) )
         {



More information about the vlc-commits mailing list