]> git.nihav.org Git - nihav.git/blobdiff - nihav-core/src/codecs/mod.rs
remove trailing whitespaces
[nihav.git] / nihav-core / src / codecs / mod.rs
index 86441e6031ef20dfe118cff8069e98ca8159b11f..43abbfd12ebd92209d7553ed9e327f678f9935ae 100644 (file)
@@ -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<ByteIOError> for EncoderError {
     fn from(_: ByteIOError) -> Self { EncoderError::Bug }
 }
 
+impl From<AllocatorError> 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.