From 31d4ba2eaee98cb09eaf1b6c4ab29698018ff4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 31 Oct 2022 15:19:01 +0200 Subject: [PATCH] fmp4mux: For VP9, write resolution into the tkhd and include a stss box to signal that not all frames are sync samples Part-of: --- mux/fmp4/src/fmp4mux/boxes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mux/fmp4/src/fmp4mux/boxes.rs b/mux/fmp4/src/fmp4mux/boxes.rs index d2da9619..358a0d75 100644 --- a/mux/fmp4/src/fmp4mux/boxes.rs +++ b/mux/fmp4/src/fmp4mux/boxes.rs @@ -621,7 +621,7 @@ fn write_tkhd( // Width/height match s.name() { - "video/x-h264" | "video/x-h265" | "image/jpeg" => { + "video/x-h264" | "video/x-h265" | "video/x-vp9" | "image/jpeg" => { let width = s.get::("width").context("video caps without width")? as u32; let height = s .get::("height") @@ -855,7 +855,7 @@ fn write_stbl( // For video write a sync sample box as indication that not all samples are sync samples let s = caps.structure(0).unwrap(); match s.name() { - "video/x-h264" | "video/x-h265" => { + "video/x-h264" | "video/x-h265" | "video/x-vp9" => { write_full_box(v, b"stss", FULL_BOX_VERSION_0, FULL_BOX_FLAGS_NONE, |v| { write_stss(v, cfg) })?