fix windows video record

This commit is contained in:
ochibani 2025-01-05 10:45:07 +02:00
parent de17a95d25
commit b0ea835322
No known key found for this signature in database
GPG Key ID: 2C6B61CE0C704ED4

View File

@ -451,6 +451,10 @@ impl Ffmpeg {
};
let mut ffmpeg_command = FfmpegCommand::new();
let format = "gdigrab";
let filename = self.saved_filename.clone();
self.output = Path::new(&filename).extension()
.ok_or_else(|| anyhow!("Failed to get file extension."))?
.to_string_lossy().to_string();
// Record video to tmp if audio record enabled
if !self.audio_input_id.active_id().ok_or_else(|| anyhow!("Failed to get audio input device ID."))?