Skip to content

Commit

Permalink
fix re_video example
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 11, 2024
1 parent 5f872b3 commit 4e201d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/store/re_video/examples/frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ fn main() {
video.config.coded_height
);

let mut decoder = create_decoder(&video);
let mut decoder = create_decoder(video_path, &video);

write_video_frames(&video, decoder.as_mut(), &output_dir);
}

fn create_decoder(video: &VideoData) -> Box<dyn SyncDecoder> {
fn create_decoder(debug_name: &str, video: &VideoData) -> Box<dyn SyncDecoder> {
if video.config.is_av1() {
Box::new(
re_video::decode::av1::SyncDav1dDecoder::new().expect("Failed to start AV1 decoder"),
re_video::decode::av1::SyncDav1dDecoder::new(debug_name.to_owned())
.expect("Failed to start AV1 decoder"),
)
} else {
panic!("Unsupported codec: {}", video.human_readable_codec_string());
Expand Down

0 comments on commit 4e201d1

Please sign in to comment.