diff options
| author | Malte Voos <git@mal.tc> | 2025-12-25 11:05:19 +0100 |
|---|---|---|
| committer | Malte Voos <git@mal.tc> | 2025-12-25 11:05:19 +0100 |
| commit | bb641f353c3dd81f5e3b16ecaf1fae669b3ac67b (patch) | |
| tree | 51def81474c6cd861fa98519c2b20b6d9f892ded /src/subtitles/mod.rs | |
| parent | c347b6133365dcf1b7da4e77890b20d04d6cfba4 (diff) | |
| download | lleap-bb641f353c3dd81f5e3b16ecaf1fae669b3ac67b.tar.gz lleap-bb641f353c3dd81f5e3b16ecaf1fae669b3ac67b.zip | |
fix whisper subtitles not appearing in subtitle selection menu
Diffstat (limited to 'src/subtitles/mod.rs')
| -rw-r--r-- | src/subtitles/mod.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/subtitles/mod.rs b/src/subtitles/mod.rs index a545d52..acb73dc 100644 --- a/src/subtitles/mod.rs +++ b/src/subtitles/mod.rs @@ -26,9 +26,8 @@ pub struct SubtitleCue { pub end_time: gst::ClockTime, } -#[derive(Debug, Clone)] +#[derive(Default, Debug, Clone)] pub struct SubtitleTrack { - pub metadata: TrackMetadata, // SoA of cue text, start timestamp, end timestamp pub texts: Vec<String>, pub start_times: Vec<gst::ClockTime>, @@ -50,15 +49,6 @@ impl TrackMetadata { } impl SubtitleTrack { - pub fn new(metadata: TrackMetadata) -> Self { - Self { - metadata, - texts: Vec::new(), - start_times: Vec::new(), - end_times: Vec::new(), - } - } - pub fn push_cue(&mut self, cue: SubtitleCue) { let SubtitleCue { text, |