mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
refactor: code cleanup
This commit is contained in:
parent
c440e83828
commit
721b6c0da6
68 changed files with 1161 additions and 1036 deletions
|
@ -45,8 +45,8 @@
|
|||
"@yume-chan/tsconfig": "workspace:^1.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"jest": "^30.0.0-alpha.4",
|
||||
"prettier": "^3.2.5",
|
||||
"ts-jest": "^29.1.2",
|
||||
"prettier": "^3.3.0",
|
||||
"ts-jest": "^29.1.4",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,11 +339,9 @@ export class WebCodecsVideoDecoder implements ScrcpyVideoDecoder {
|
|||
// AV1 doesn't need to do this, the handling code also doesn't set `#config`.
|
||||
let data: Uint8Array;
|
||||
if (this.#config !== undefined) {
|
||||
data = new Uint8Array(
|
||||
this.#config.byteLength + packet.data.byteLength,
|
||||
);
|
||||
data = new Uint8Array(this.#config.length + packet.data.length);
|
||||
data.set(this.#config, 0);
|
||||
data.set(packet.data, this.#config.byteLength);
|
||||
data.set(packet.data, this.#config.length);
|
||||
this.#config = undefined;
|
||||
} else {
|
||||
data = packet.data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue