quite if config file not found, remove HW_CODEC_CONFIG, option env LIBGL_ALWAYS_SOFTWARE=1

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-07-30 11:09:14 +08:00
parent 3c4852a254
commit 2c619cbe41
3 changed files with 8 additions and 18 deletions

View File

@@ -314,7 +314,7 @@ impl HwDecoderImage<'_> {
}
fn get_config(k: &str) -> ResultType<CodecInfos> {
let v = HwCodecConfig::get()
let v = HwCodecConfig::load()
.options
.get(k)
.unwrap_or(&"".to_owned())
@@ -375,10 +375,7 @@ pub fn check_config_process() {
// wait up to 10 seconds
for _ in 0..10 {
std::thread::sleep(std::time::Duration::from_secs(1));
if let Ok(Some(status)) = child.try_wait() {
if status.success() {
HwCodecConfig::refresh();
}
if let Ok(Some(_)) = child.try_wait() {
break;
}
}
@@ -399,7 +396,6 @@ pub fn check_config_process() {
log::error!("Check hwcodec config, error attempting to wait: {e}")
}
}
HwCodecConfig::refresh();
}
}
};