From a45d54b6660bf0c814ff1a0dc2905e80b0e17a28 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Mon, 10 Jun 2024 11:57:07 -0400 Subject: [PATCH] Actually use the correct threading type, whoops --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- src/ffmpeg.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870e041..c285e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Version 0.12.1 +## Version 0.12.2 - Enable threading for ffmpeg decoder, should greatly improve speed diff --git a/Cargo.lock b/Cargo.lock index 3cf4a7c..0e13a99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,7 +103,7 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "av-scenechange" -version = "0.12.1" +version = "0.12.2" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index e2acf65..ebf1b02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "av-scenechange" -version = "0.12.1" +version = "0.12.2" authors = ["Josh Holmer "] edition = "2021" description = "Estimates frames in a video where a scenecut would be ideal" diff --git a/src/ffmpeg.rs b/src/ffmpeg.rs index ac80de4..085e0aa 100644 --- a/src/ffmpeg.rs +++ b/src/ffmpeg.rs @@ -46,7 +46,7 @@ impl FfmpegDecoder { .ok_or_else(|| anyhow::anyhow!("Could not find video stream"))?; let stream_index = input.index(); let mut context = ffmpeg::codec::context::Context::from_parameters(input.parameters())?; - context.set_threading(threading::Config::kind(threading::Type::Slice)); + context.set_threading(threading::Config::kind(threading::Type::Frame)); let mut decoder = context.decoder().video()?; decoder.set_parameters(input.parameters())?;