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),