Refactor crate::codec (#78)

* Refactor AVCodec wrapper

* Implement new config interface

* Move ProfileIter to codec::profile

* Add CodecDescriptor
This commit is contained in:
FreezyLemon
2024-11-03 01:31:30 +01:00
committed by GitHub
parent f1e978b58d
commit f1c6b442b5
20 changed files with 929 additions and 509 deletions

View File

@ -83,7 +83,8 @@ fn transcoder<P: AsRef<Path>>(
let mut decoder = context.decoder().audio()?;
let codec = ffmpeg::encoder::find(octx.format().codec(path, media::Type::Audio))
.expect("failed to find encoder")
.audio()?;
.audio()
.expect("encoder is not audio encoder");
let global = octx
.format()
.flags()