Reformat code with latest cargo fmt

This commit is contained in:
Zhiming Wang
2020-06-02 17:54:31 +08:00
parent fdea9d77e7
commit 307f52c002
11 changed files with 46 additions and 27 deletions

View File

@ -66,14 +66,16 @@ fn transcoder<P: AsRef<Path>>(
path: &P,
filter_spec: &str,
) -> Result<Transcoder, ffmpeg::Error> {
let input = ictx.streams()
let input = ictx
.streams()
.best(media::Type::Audio)
.expect("could not find best audio stream");
let mut decoder = input.codec().decoder().audio()?;
let codec = ffmpeg::encoder::find(octx.format().codec(path, media::Type::Audio))
.expect("failed to find encoder")
.audio()?;
let global = octx.format()
let global = octx
.format()
.flags()
.contains(ffmpeg::format::flag::Flags::GLOBAL_HEADER);