Skip to content

Commit

Permalink
IT WORKS!
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Oct 1, 2024
1 parent c5d40f0 commit ae6656a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5929,6 +5929,7 @@ dependencies = [
"itertools 0.13.0",
"ordered-float",
"parking_lot",
"re_log",
"re_mp4",
"re_tracing",
"thiserror",
Expand Down
1 change: 1 addition & 0 deletions crates/store/re_video/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ features = ["all"]
[features]

[dependencies]
re_log.workspace = true
re_tracing.workspace = true

crossbeam.workspace = true
Expand Down
11 changes: 7 additions & 4 deletions crates/store/re_video/src/decode/av1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ impl Decoder {

let thread = std::thread::Builder::new()
.name("av1_decoder".into())
.spawn(move || decoder_thread(&command_rx, &reset_rx, &parker, &on_output))
.spawn(move || {
decoder_thread(&command_rx, &reset_rx, &parker, &on_output);
re_log::debug!("Closing decoder thread");
})
.expect("failed to spawn decoder thread");

Self {
Expand Down Expand Up @@ -185,7 +188,7 @@ fn submit_chunk(decoder: &mut dav1d::Decoder, chunk: Chunk) {
Err(err) if err.is_again() => {}
Err(err) => {
// Something went wrong
panic!("Failed to decode frame: {err}");
panic!("Failed to decode frame: {err}"); // TODO: handle errors
}
}

Expand All @@ -199,7 +202,7 @@ fn submit_chunk(decoder: &mut dav1d::Decoder, chunk: Chunk) {
Err(err) if err.is_again() => {}
Err(err) => {
// Something went wrong
panic!("Failed to decode frame: {err}");
panic!("Failed to decode frame: {err}"); // TODO: handle errors
}
};
}
Expand Down Expand Up @@ -239,7 +242,7 @@ fn output_frames(decoder: &mut dav1d::Decoder, on_output: &OutputCallback) {
break;
}
Err(err) => {
panic!("Failed to decode frame: {err}");
panic!("Failed to decode frame: {err}"); // TODO: handle errors
}
}
}
Expand Down

0 comments on commit ae6656a

Please sign in to comment.