aboutsummaryrefslogtreecommitdiff
path: root/transcoder/src/snippet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'transcoder/src/snippet.rs')
-rw-r--r--transcoder/src/snippet.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/transcoder/src/snippet.rs b/transcoder/src/snippet.rs
index 42847a0..e9569da 100644
--- a/transcoder/src/snippet.rs
+++ b/transcoder/src/snippet.rs
@@ -4,6 +4,7 @@
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
+use crate::LOCAL_TRANSCODING_TASKS;
use jellybase::cache::async_cache_file;
use jellycommon::{jhls::EncodingProfile, AssetLocation};
use log::info;
@@ -21,6 +22,7 @@ pub async fn transcode(
Ok(async_cache_file(
&["snip-tc", key, &format!("{enc:?}")],
move |mut output| async move {
+ let _permit = LOCAL_TRANSCODING_TASKS.acquire().await?;
info!("transcoding snippet {key}");
let args = match enc {
EncodingProfile::Video {