Fix stride align

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-03 09:27:51 +08:00
parent 42c95f71f6
commit 5aa97faedd
6 changed files with 25 additions and 18 deletions

View File

@@ -50,7 +50,8 @@ impl MediaCodecDecoder {
MediaCodecDecoders { h264, h265 }
}
pub fn decode(&mut self, data: &[u8], fmt: ImageFormat, raw: &mut Vec<u8>) -> ResultType<bool> {
// to-do: apply stride_align to raw output data
pub fn decode(&mut self, data: &[u8], stride_align: usize, fmt: ImageFormat, raw: &mut Vec<u8>) -> ResultType<bool> {
match self.dequeue_input_buffer(Duration::from_millis(10))? {
Some(mut input_buffer) => {
let mut buf = input_buffer.buffer_mut();