From ce9eb140ab9243d1c87ace4727a82b7fa50f964b Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 28 Jan 2024 03:21:03 +0100 Subject: fix yet another fundamental issue in the ebml reader and seekindex. --- transcoder/src/subtitles.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'transcoder/src') diff --git a/transcoder/src/subtitles.rs b/transcoder/src/subtitles.rs index 1fea3cf..84db5a9 100644 --- a/transcoder/src/subtitles.rs +++ b/transcoder/src/subtitles.rs @@ -39,6 +39,18 @@ pub fn parse_webvtt_blocks(blocks: Vec<(u64, u64, Vec)>) -> anyhow::Result)>) -> anyhow::Result> { + let mut out = Vec::new(); + for (pts, dur, block) in blocks { + let _content = String::from_utf8_lossy(&block).trim().to_string(); + out.push(SubtitleCue { + content: "PGS stub".to_string(), + start: pts as f64 / 1000., + end: (pts + dur) as f64 / 1000., + }); + } + Ok(out) +} pub fn parse_ass_blocks( _codec_private: Vec, -- cgit v1.2.3-70-g09d2