# HG changeset patch # User reimar # Date 1275759131 0 # Node ID 6428a4b387632b6a40c4918fb8244a89b2762c93 # Parent a22559ea1c287f5583db043d0de325940edae8c7 Add webm/VP8 support to native matroska demuxer. Patch by James Zern [jzern google com] diff -r a22559ea1c28 -r 6428a4b38763 libmpdemux/demux_mkv.c --- 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; } diff -r a22559ea1c28 -r 6428a4b38763 libmpdemux/matroska.h --- 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"