X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fcodecs%2Fmod.rs;h=43abbfd12ebd92209d7553ed9e327f678f9935ae;hb=c8db9313866c4d7bcf34e45e486d2f909daa16d9;hp=86441e6031ef20dfe118cff8069e98ca8159b11f;hpb=20766f15236404c4eb336229d4a9d202d107bb99;p=nihav.git diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 86441e6..43abbfd 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -77,7 +77,7 @@ impl Default for NADecoderSupport { } /// Decoder trait. -pub trait NADecoder { +pub trait NADecoder: NAOptionHandler { /// Initialises the decoder. /// /// It takes [`NADecoderSupport`] allocated by the caller and `NACodecInfoRef` provided by demuxer. @@ -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.