Skip to content

Commit 899a8b6

Browse files
fix(dgw): fail the live skip when TagDecoder errors
A parse error stays at the same offset. Swallowing it while draining already-recorded tags hid corruption. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bf4e8cd commit 899a8b6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • crates/video-streamer/src/streamer

crates/video-streamer/src/streamer/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ pub fn webm_stream(
4848
webm_itr.set_codec(encode_writer_config.codec);
4949

5050
// Skip already-recorded tags. Incomplete trailing input is `None`.
51-
while let Some(Ok(_)) = webm_itr.next() {}
51+
loop {
52+
match webm_itr.next() {
53+
Some(Ok(_)) => {}
54+
Some(Err(error)) => return Err(error.into()),
55+
None => break,
56+
}
57+
}
5258

5359
let cut_block_position = webm_itr.previous_emitted_tag_postion();
5460

0 commit comments

Comments
 (0)