mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-22 04:31:00 +03:00
refactor DST_STRIDE_RGBA
This commit is contained in:
@@ -236,7 +236,13 @@ pub struct HwDecoderImage<'a> {
|
||||
}
|
||||
|
||||
impl HwDecoderImage<'_> {
|
||||
pub fn to_fmt(&self, fmt: ImageFormat, fmt_data: &mut Vec<u8>, i420: &mut Vec<u8>) -> ResultType<()> {
|
||||
// take dst_stride into account when you convert
|
||||
pub fn to_fmt(
|
||||
&self,
|
||||
(fmt, dst_stride): (ImageFormat, usize),
|
||||
fmt_data: &mut Vec<u8>,
|
||||
i420: &mut Vec<u8>,
|
||||
) -> ResultType<()> {
|
||||
let frame = self.frame;
|
||||
match frame.pixfmt {
|
||||
AVPixelFormat::AV_PIX_FMT_NV12 => hw::hw_nv12_to(
|
||||
|
||||
Reference in New Issue
Block a user