Open sdroege opened 1 year ago
diff --git a/tools/src/main.rs b/tools/src/main.rs
index ca17a41..148ba90 100644
--- a/tools/src/main.rs
+++ b/tools/src/main.rs
@@ -95,7 +95,10 @@ fn main() -> std::io::Result<()> {
let header = ivf::read_header(&mut r)?;
println!("{:?}", header);
- let mut dec = dav1d::Decoder::new().expect("failed to create decoder instance");
+ let mut settings = dav1d::Settings::default();
+ settings.set_n_threads(2);
+ let mut dec =
+ dav1d::Decoder::with_settings(&settings).expect("failed to create decoder instance");
while let Ok(packet) = ivf::read_packet(&mut r) {
println!("Packet {}", packet.pts);
With 1 thread it doesn't deadlock, with 2 or more threads it deadlocks.
Actually VLC also deadlocks on this file in the same way. I'll report this to dav1d then.
You may keep the issue open.
File available from https://www.dropbox.com/s/s8o8paaeghcz3cy/dav1d-rs-get-picture-deadlock.ivf?dl=0. This is an AV1 version of https://www.youtube.com/watch?v=mkggXE5e2yk
I was quite certain that this is a bug in dav1d but... I can't reproduce it with dav1dplay (from the dav1d examples, using the placebo-gl renderer because the SDL one doesn't support this configuration) and also not with ffmpeg. But I can reproduce it with the dav1d GStreamer plugin, which uses dav1d-rs.