util/error: refactor error handling

This commit is contained in:
meh
2015-05-24 18:51:34 +02:00
parent 2716893612
commit 5b80b10949
13 changed files with 205 additions and 101 deletions

View File

@ -34,7 +34,7 @@ impl Decoder {
Ok(Video(self))
}
else {
Err(Error::from(AVERROR_INVALIDDATA))
Err(Error::InvalidData)
}
}
@ -43,7 +43,7 @@ impl Decoder {
Ok(Audio(self))
}
else {
Err(Error::from(AVERROR_INVALIDDATA))
Err(Error::InvalidData)
}
}
@ -52,7 +52,7 @@ impl Decoder {
Ok(Subtitle(self))
}
else {
Err(Error::from(AVERROR_INVALIDDATA))
Err(Error::InvalidData)
}
}