add &'static str error variant

This commit is contained in:
2018-09-15 13:29:56 +02:00
parent 1a89ed02ba
commit ed2c8d3e10

View File

@@ -18,6 +18,7 @@ enum Error {
Io(io::Error),
Ffmpeg(ffmpeg::Error),
String(String),
Str(&'static str),
}
impl From<ffmpeg::Error> for Error {
@@ -38,6 +39,12 @@ impl From<String> for Error {
}
}
impl From<&'static str> for Error {
fn from(v: &'static str) -> Error {
Error::Str(v)
}
}
fn filter(
decoder: &codec::decoder::Audio,
encoder: &codec::encoder::Audio,