forge
Explore
Log in

Don't you dare go Hollow

ec-cc streams: skip the empty block that ffmpeg's trailing SRT newline leaves, which panicked the reference parser

Browse files at this commit

c56a74b7d068678a37c13cb815b250855d77ed6fAhmet Kaan GümüşParent: 5c24357
crates/ec-cc/tests/streams.rsmodified+1 -1
@@ -143,7 +143,7 @@ fn ffmpeg_cues(path: &PathBuf, demuxer_args: &[&str]) -> Vec<(String, f64)> {
143143 assert!(st.success());
144144 let text = std::fs::read_to_string(&srt).unwrap();
145145 let mut out = Vec::new();
146- for block in text.split("\n\n") {
146+ for block in text.split("\n\n").filter(|b| !b.trim().is_empty()) {
147147 let mut l = block.lines();
148148 l.next().unwrap();
149149 let Some(tl) = l.next() else { continue };