From fd8b820eef5b63dfa8ba11732843922c48ead5b8 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Mon, 14 Aug 2017 00:58:06 -0400 Subject: [PATCH] Stub-encode Tracks --- src/bin/stub.rs | 2 ++ src/webm.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/bin/stub.rs b/src/bin/stub.rs index c545f56..a77a1a0 100644 --- a/src/bin/stub.rs +++ b/src/bin/stub.rs @@ -9,6 +9,8 @@ pub fn main() { encode_webm_element(WebmElement::EbmlHead, &mut cursor).unwrap(); encode_webm_element(WebmElement::Segment, &mut cursor).unwrap(); + encode_webm_element(WebmElement::Tracks(&[]), &mut cursor).unwrap(); + encode_webm_element(WebmElement::Cluster, &mut cursor).unwrap(); encode_webm_element(WebmElement::Timecode(0), &mut cursor).unwrap(); diff --git a/src/webm.rs b/src/webm.rs index 7f2f7a4..52eb318 100644 --- a/src/webm.rs +++ b/src/webm.rs @@ -115,6 +115,7 @@ pub fn encode_webm_element(element: WebmElement, output: &mut T WebmElement::Segment => encode_tag_header(SEGMENT_ID, Varint::Unknown, output), WebmElement::SeekHead => Ok(()), WebmElement::Cues => Ok(()), + WebmElement::Tracks(data) => encode_bytes(TRACKS_ID, data, output), WebmElement::Cluster => encode_tag_header(CLUSTER_ID, Varint::Unknown, output), WebmElement::Timecode(time) => encode_integer(TIMECODE_ID, time, output), WebmElement::SimpleBlock {..} => encode_simple_block(element, output),