If there is hardware ram encoder as fallback, not require all adapters (#7987)

support the codec format

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2024-05-09 09:02:25 +08:00
committed by GitHub
parent 9d56e29a09
commit a31a68ba17
3 changed files with 27 additions and 26 deletions

View File

@@ -96,10 +96,7 @@ impl EncoderApi for HwRamEncoder {
height: ctx.height as _,
bitrate,
}),
Err(_) => {
HwCodecConfig::clear_ram();
Err(anyhow!(format!("Failed to create encoder")))
}
Err(_) => Err(anyhow!(format!("Failed to create encoder"))),
}
}
_ => Err(anyhow!("encoder type mismatch")),