[vlc-commits] Add HEVC support in MKV

Denis Charmet git at videolan.org
Sun Oct 20 16:19:10 CEST 2013


vlc/vlc-2.1 | branch: master | Denis Charmet <typx at dinauz.org> | Sat Oct 19 20:02:50 2013 +0200| [305cea7ad696dd60654a2d969c118c0c19b9e4a0] | committer: Jean-Baptiste Kempf

Add HEVC support in MKV

(cherry picked from commit 04e5cf986fae141a874e5a0235a12b002cbe497a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=305cea7ad696dd60654a2d969c118c0c19b9e4a0
---

 modules/codec/avcodec/fourcc.c               |    5 ++++-
 modules/demux/mkv/matroska_segment_parse.cpp |    5 +++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index f6a891d..4904f4b 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -61,7 +61,6 @@ static const struct
 
     { VLC_CODEC_SVQ1, AV_CODEC_ID_SVQ1, VIDEO_ES },
     { VLC_CODEC_SVQ3, AV_CODEC_ID_SVQ3, VIDEO_ES },
-
     { VLC_CODEC_H264, AV_CODEC_ID_H264, VIDEO_ES },
     { VLC_CODEC_H263, AV_CODEC_ID_H263, VIDEO_ES },
     { VLC_CODEC_H263I, AV_CODEC_ID_H263I,VIDEO_ES },
@@ -222,6 +221,10 @@ static const struct
     { VLC_CODEC_MSS2, AV_CODEC_ID_MSS2, VIDEO_ES },
 #endif
 
+#ifdef AV_CODEC_ID_H265 // FFmpeg 55.37.100
+    { VLC_CODEC_HEVC, AV_CODEC_ID_HEVC, VIDEO_ES },
+#endif
+
     /* Videogames Codecs */
 
     { VLC_CODEC_INTERPLAY, AV_CODEC_ID_INTERPLAY_VIDEO, VIDEO_ES },
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 3b058de..2988f71 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1365,6 +1365,11 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
             fill_extra_data( p_tk, 0 );
         }
     }
+    else if( !strncmp( p_tk->psz_codec, "V_MPEGH/ISO/HEVC", 16) )
+    {
+        p_tk->fmt.i_codec = VLC_CODEC_HEVC;
+        fill_extra_data( p_tk, 0 );
+    } 
     else if( !strcmp( p_tk->psz_codec, "V_QUICKTIME" ) )
     {
         MP4_Box_t *p_box = (MP4_Box_t*)xmalloc( sizeof( MP4_Box_t ) );



More information about the vlc-commits mailing list