opt: no copy during transmitting the decoded frame

This commit is contained in:
Kingtous
2023-02-11 12:25:13 +08:00
parent f8c78a6bf2
commit f521b1665a
4 changed files with 9 additions and 9 deletions

View File

@@ -201,12 +201,12 @@ impl InvokeUiSession for SciterHandler {
self.call("adaptSize", &make_args!());
}
fn on_rgba(&self, data: &[u8]) {
fn on_rgba(&self, data: Vec<u8>) {
VIDEO
.lock()
.unwrap()
.as_mut()
.map(|v| v.render_frame(data).ok());
.map(|v| v.render_frame(&data).ok());
}
fn set_peer_info(&self, pi: &PeerInfo) {