From: Kostya Shishkov Date: Wed, 3 Jun 2020 09:44:18 +0000 (+0200) Subject: core/codecs: implement AllocatorError -> EncoderError conversion X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=2dbe1e64ee27b0f28a6d670daba0fc56c76a2fb1;p=nihav.git core/codecs: implement AllocatorError -> EncoderError conversion --- diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 516d9ac..43abbfd 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -158,6 +158,10 @@ impl From for EncoderError { fn from(_: ByteIOError) -> Self { EncoderError::Bug } } +impl From for EncoderError { + fn from(_: AllocatorError) -> Self { EncoderError::AllocError } +} + /// Encoding parameter flag to force constant bitrate mode. pub const ENC_MODE_CBR: u64 = 1 << 0; /// Encoding parameter flag to force constant framerate mode.