Debian Patches

Status for rust-libmpv2/5.0.3-2

Patch Description Author Forwarded Bugs Origin Last update
0002-report-property-change-with-none-format.patch Report a property change with format None instead of hiding it wait_event() returns Option<Result<Event>> and used None for two different
things: "the event queue is empty", and "this event is a property change for
a property that is not currently available". A caller draining the queue with
"while let Some(e) = wait_event(0.0)" therefore stops at the first
unavailable property instead of reading the rest of the queue.
.
This is not theoretical. A GTK player that observes 22 properties before
loading a file finds almost all of them unavailable, so the drain loop exits
on the first one, no event is ever processed, and playback never starts. Only
two wakeups arrive, because the queue never empties again.
.
Report the event with a new PropertyData::None variant instead, so that
callers can tell the two cases apart.

diff --git a/src/lib.rs b/src/lib.rs
index 4b267e2..a62669b 100644
tymmesyde <tymmesyde@gmail.com> yes upstream, https://github.com/Stremio/libmpv2-rs/commit/f84e54b 2026-09-29
0003-make-wait-event-immutable.patch Take &self rather than &mut self in wait_event Reading the event queue does not need exclusive access, and requiring it
forces a caller that keeps the handle in shared state to take a mutable
borrow just to poll for events. Upstream made the same change in 6.0.0.

diff --git a/src/mpv/events.rs b/src/mpv/events.rs
index 08d7960..ab3a54a 100644
tymmesyde <tymmesyde@gmail.com> no upstream, https://github.com/Stremio/libmpv2-rs/commit/d8703ec 2026-09-29
0004-fix-unobserve-property-result.patch Treat a positive mpv return value as success, not as an error mpv_err() mapped every non-zero return to Err, but mpv_unobserve_property()
returns the number of properties it stopped observing, which is positive on
success, so callers saw a spurious error on every successful call. Only
negative values are mpv error codes.

diff --git a/src/mpv.rs b/src/mpv.rs
index 2830a3f..0dbfd07 100644
tymmesyde <tymmesyde@gmail.com> yes upstream, https://github.com/Stremio/libmpv2-rs/commit/f4f0ca6 2026-09-29
0001-drop-opengl-example-sdl2.patch Drop the opengl example and its sdl2 dev-dependency The `opengl` example (examples/opengl.rs) is the only thing in this crate
that needs sdl2, which is not packaged in Debian. Following the Debian Rust
team's established pattern for a dev-dependency that isn't in the archive
(see drop-criterion.patch in adler/dragonbox_ecma/concread): remove the
[[example]] stanza and its supporting [dev-dependencies.sdl2] entry, and
delete the example file itself, rather than marking the autopkgtest broken
(test_is_broken does not help here — it does not remove the crate from the
generated debian/tests/control Depends: line, so `badpkg: Test dependencies
are unsatisfiable` still fires before any test runs). The `events` and
`protocol` examples, and the crossbeam/serde_json dev-dependencies they and
the test suite use, are untouched and remain buildable/testable as-is.

diff --git a/Cargo.toml b/Cargo.toml
index 47ac377..6d6ce8c 100644
Juan Manuel Méndez Rey <juan.mendezr@proton.me> not-needed

All known versions for source package 'rust-libmpv2'

Links