Revert "Fix/macos texture stride align"

This commit is contained in:
RustDesk
2023-03-03 13:18:34 +08:00
committed by GitHub
parent a35e0a1d84
commit 29abda56df
12 changed files with 52 additions and 65 deletions

View File

@@ -18,7 +18,7 @@ use webm::mux;
use webm::mux::Track;
use scrap::vpxcodec as vpx_encode;
use scrap::{TraitCapturer, Capturer, Display, STRIDE};
use scrap::{TraitCapturer, Capturer, Display, STRIDE_ALIGN};
const USAGE: &'static str = "
Simple WebM screen capture.
@@ -137,7 +137,7 @@ fn main() -> io::Result<()> {
if let Ok(frame) = c.frame(Duration::from_millis(0)) {
let ms = time.as_secs() * 1000 + time.subsec_millis() as u64;
for frame in vpx.encode(ms as i64, &frame, STRIDE).unwrap() {
for frame in vpx.encode(ms as i64, &frame, STRIDE_ALIGN).unwrap() {
vt.add_frame(frame.data, frame.pts as u64 * 1_000_000, frame.key);
}
}