-static const EbmlSyntax matroska_cluster[] = {
- { MATROSKA_ID_CLUSTERTIMECODE, EBML_UINT, 0, offsetof(MatroskaCluster, timecode) },
- { MATROSKA_ID_BLOCKGROUP, EBML_NEST, sizeof(MatroskaBlock), offsetof(MatroskaCluster, blocks), { .n = matroska_blockgroup } },
- { MATROSKA_ID_SIMPLEBLOCK, EBML_PASS, sizeof(MatroskaBlock), offsetof(MatroskaCluster, blocks), { .n = matroska_blockgroup } },
- { MATROSKA_ID_CLUSTERPOSITION, EBML_NONE },
- { MATROSKA_ID_CLUSTERPREVSIZE, EBML_NONE },
- { 0 }
-};
-
-static const EbmlSyntax matroska_clusters[] = {
- { MATROSKA_ID_CLUSTER, EBML_NEST, 0, 0, { .n = matroska_cluster } },
- { MATROSKA_ID_INFO, EBML_NONE },
- { MATROSKA_ID_CUES, EBML_NONE },
- { MATROSKA_ID_TAGS, EBML_NONE },
- { MATROSKA_ID_SEEKHEAD, EBML_NONE },
- { 0 }
-};
-
-static const EbmlSyntax matroska_cluster_incremental_parsing[] = {
- { MATROSKA_ID_CLUSTERTIMECODE, EBML_UINT, 0, offsetof(MatroskaCluster, timecode) },
- { MATROSKA_ID_BLOCKGROUP, EBML_NEST, sizeof(MatroskaBlock), offsetof(MatroskaCluster, blocks), { .n = matroska_blockgroup } },
- { MATROSKA_ID_SIMPLEBLOCK, EBML_PASS, sizeof(MatroskaBlock), offsetof(MatroskaCluster, blocks), { .n = matroska_blockgroup } },
- { MATROSKA_ID_CLUSTERPOSITION, EBML_NONE },
- { MATROSKA_ID_CLUSTERPREVSIZE, EBML_NONE },
- { MATROSKA_ID_INFO, EBML_NONE },
- { MATROSKA_ID_CUES, EBML_NONE },
- { MATROSKA_ID_TAGS, EBML_NONE },
- { MATROSKA_ID_SEEKHEAD, EBML_NONE },
- { MATROSKA_ID_CLUSTER, EBML_STOP },
- { 0 }
-};
-
-static const EbmlSyntax matroska_cluster_incremental[] = {
+// The following array contains SimpleBlock and BlockGroup twice
+// in order to reuse the other values for matroska_cluster_enter.
+static const EbmlSyntax matroska_cluster_parsing[] = {
+ { MATROSKA_ID_SIMPLEBLOCK, EBML_BIN, 0, offsetof(MatroskaBlock, bin) },
+ { MATROSKA_ID_BLOCKGROUP, EBML_NEST, 0, 0, { .n = matroska_blockgroup } },