fix: don't fail player init when mpv lacks the osc option

Found via the new debug_log checkpoints: the bundled Linux libmpv was
built without lua, so mpv_set_option_string("osc", "no") returned
"option not found" and player_init bailed out entirely before ever
creating a renderer. We only set this to turn OSC off, which is moot
if OSC doesn't exist in the first place, so treat it as a warning
instead of a fatal error.
This commit is contained in:
KhooLy 2026-06-20 16:28:38 +03:00
parent 96c723c67f
commit eb5b96122f

View file

@ -325,7 +325,9 @@ impl MpvRenderer {
renderer.set_option("vo", "libmpv")?;
renderer.set_option("idle", "yes")?;
renderer.set_option("keep-open", "yes")?;
renderer.set_option("osc", "no")?;
if let Err(error) = renderer.set_option("osc", "no") {
log::warn!("set_option(osc, no) failed (mpv build without lua/OSC?): {error}");
}
renderer.set_option("osd-level", "0")?;
renderer.set_option("osd-bar", "no")?;
renderer.set_option("input-default-bindings", "yes")?;
@ -393,7 +395,9 @@ impl MpvRenderer {
renderer.set_option("ao", "null")?;
renderer.set_option("audio", "no")?;
renderer.set_option("idle", "yes")?;
renderer.set_option("osc", "no")?;
if let Err(error) = renderer.set_option("osc", "no") {
log::warn!("set_option(osc, no) failed (mpv build without lua/OSC?): {error}");
}
renderer.set_option("osd-level", "0")?;
renderer.set_option("hr-seek", "yes")?;
renderer.set_option("pause", "yes")?;