aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--transcoder/src/fragment.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/transcoder/src/fragment.rs b/transcoder/src/fragment.rs
index a7a6f42..58c8459 100644
--- a/transcoder/src/fragment.rs
+++ b/transcoder/src/fragment.rs
@@ -85,8 +85,11 @@ pub fn transcode(
let mut stdin = proc.stdin.take().unwrap();
let mut stdout = proc.stdout.take().unwrap();
+ let mut buf = Vec::new();
+ write_init_frag(ContainerFormat::Matroska, &mut buf, input)?;
+
spawn(move || {
- write_init_frag(ContainerFormat::Matroska, &mut stdin, input).unwrap();
+ stdin.write_all(&buf).unwrap();
stdin.flush().unwrap();
drop(stdin);
});