let mut didx = 0;
let mut sidx = 0;
for _ in 0..self.h {
- for x in 0..self.w { dst[didx + x] = self.frame[sidx + x]; }
+ dst[didx..][..self.w].copy_from_slice(&self.frame[sidx..][..self.w]);
sidx += self.stride;
didx += stride;
if is_scaled {
}
}
+impl NAOptionHandler for SmackerVideoDecoder {
+ fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
+ fn set_options(&mut self, _options: &[NAOption]) { }
+ fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
+}
+
pub fn get_decoder_video() -> Box<dyn NADecoder + Send> {
Box::new(SmackerVideoDecoder::new())
}
Err(DecoderError::InvalidData)
}
}
+ #[allow(clippy::manual_memcpy)]
fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
let info = pkt.get_stream().get_info();
if let NACodecTypeInfo::Audio(_) = info.get_properties() {
}
}
+impl NAOptionHandler for SmackerAudioDecoder {
+ fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
+ fn set_options(&mut self, _options: &[NAOption]) { }
+ fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
+}
+
pub fn get_decoder_audio() -> Box<dyn NADecoder + Send> {
Box::new(SmackerAudioDecoder::new())
}