mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-28 23:51:07 +03:00
android: for software encoding and screen size > 1200, display size reduced to half (#8167)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -213,6 +213,14 @@ pub fn convert_to_yuv(
|
||||
);
|
||||
}
|
||||
if src_pixfmt == crate::Pixfmt::BGRA || src_pixfmt == crate::Pixfmt::RGBA {
|
||||
// stride is calculated, not real, so we need to check it
|
||||
if src_stride[0] < src_width * 4 {
|
||||
bail!(
|
||||
"src_stride[0] < src_width * 4: {} < {}",
|
||||
src_stride[0],
|
||||
src_width * 4
|
||||
);
|
||||
}
|
||||
if src.len() < src_stride[0] * src_height {
|
||||
bail!(
|
||||
"wrong src len, {} < {} * {}",
|
||||
|
||||
Reference in New Issue
Block a user