Skip to content

Commit

Permalink
fix: Raise ffmpeg errors as early as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed May 16, 2024
1 parent 949f94d commit e295757
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Fixed

- Raise `ffmpeg` errors as early as possible, e.g. when the `ffmpeg` command is not found

## [0.13.0] - 2024-05-15

## Added
Expand All @@ -16,9 +20,8 @@ All notable changes to this project will be documented in this file.
* Put `Parser` behind a trait, so that we can have multiple implementation in parallel
* Use cargo workspaces
* Better error handling using snafu
- BREAKING: Build release binaries without support for VNC, as this ([#22])
- BREAKING: Build release binaries without support for VNC, as this
* Has a dependecy on a dynamically linked library on the host executing the binary
* Needs a cross-compilation (which didn't work), as the macOS GitHub runners all run on arm and we try to build an x86 binary

[#21]: https://github.com/sbernauer/breakwater/pull/21
[#22]: https://github.com/sbernauer/breakwater/pull/22
3 changes: 2 additions & 1 deletion breakwater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ async fn main() -> Result<(), Error> {
tokio::spawn(async move {
sink.run(ffmpeg_terminate_signal_rx)
.await
.context(FfmpegDumpThreadSnafu)?;
.context(FfmpegDumpThreadSnafu)
.unwrap();
Ok::<(), Error>(())
})
});
Expand Down
2 changes: 1 addition & 1 deletion breakwater/src/sinks/ffmpeg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::cli_args::CliArgs;

#[derive(Debug, Snafu)]
pub enum Error {
#[snafu(display("Failed to start ffmpeg command {command:?}"))]
#[snafu(display("Failed to start ffmpeg command {command:?}. Is ffmpeg installed?"))]
StartFfmpeg {
source: std::io::Error,
command: String,
Expand Down

0 comments on commit e295757

Please sign in to comment.