changeset 31263:6428a4b38763

Add webm/VP8 support to native matroska demuxer. Patch by James Zern [jzern google com]
author reimar
date Sat, 05 Jun 2010 17:32:11 +0000
parents a22559ea1c28
children f19d56a023db
files libmpdemux/demux_mkv.c libmpdemux/matroska.h
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sat Jun 05 16:46:25 2010 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Jun 05 17:32:11 2010 +0000
@@ -1461,6 +1461,7 @@
     {MKV_V_MPEG4_AP,  mmioFOURCC('m', 'p', '4', 'v'), 1},
     {MKV_V_MPEG4_AVC, mmioFOURCC('a', 'v', 'c', '1'), 1},
     {MKV_V_THEORA,    mmioFOURCC('t', 'h', 'e', 'o'), 1},
+    {MKV_V_VP8,       mmioFOURCC('V', 'P', '8', '0'), 0},
     {NULL, 0, 0}
 };
 
@@ -1941,7 +1942,7 @@
 
     stream_seek(s, s->start_pos);
     str = ebml_read_header(s, &version);
-    if (str == NULL || strcmp(str, "matroska") || version > 2) {
+    if (str == NULL || (strcmp(str, "matroska") && strcmp(str, "webm")) || version > 2) {
         mp_msg(MSGT_DEMUX, MSGL_DBG2, "[mkv] no head found\n");
         return 0;
     }
--- a/libmpdemux/matroska.h	Sat Jun 05 16:46:25 2010 +0000
+++ b/libmpdemux/matroska.h	Sat Jun 05 17:32:11 2010 +0000
@@ -69,6 +69,7 @@
 #define MKV_V_MPEG4_AP   "V_MPEG4/ISO/AP"
 #define MKV_V_MPEG4_AVC  "V_MPEG4/ISO/AVC"
 #define MKV_V_THEORA     "V_THEORA"
+#define MKV_V_VP8        "V_VP8"
 
 #define MKV_S_TEXTASCII  "S_TEXT/ASCII"
 #define MKV_S_TEXTUTF8   "S_TEXT/UTF8"