From 2dbe1e64ee27b0f28a6d670daba0fc56c76a2fb1 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 3 Jun 2020 11:44:18 +0200 Subject: [PATCH] core/codecs: implement AllocatorError -> EncoderError conversion --- nihav-core/src/codecs/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.39.5