register plugin && fix r&b colors

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-02-23 10:02:54 +08:00
parent 8b7be688c2
commit 9559a889fb
2 changed files with 13 additions and 2 deletions

View File

@@ -944,9 +944,10 @@ impl VideoHandler {
}
match &vf.union {
Some(frame) => {
#[cfg(feature = "flutter_texture_render")]
// windows && flutter_texture_render, fmt is ImageFormat::ABGR
#[cfg(all(target_os = "windows", feature = "flutter_texture_render"))]
let fmt = ImageFormat::ABGR;
#[cfg(not(feature = "flutter_texture_render"))]
#[cfg(not(all(target_os = "windows", feature = "flutter_texture_render")))]
let fmt = ImageFormat::ARGB;
let res = self.decoder.handle_video_frame(frame, fmt, &mut self.rgb);
if self.record {