Repository navigation
Direct play: recover a plain-http body that ends early, goes silent or cannot be crossed - #817
Merged
Merged
Conversation
The socket source healed nothing: a server that closed the response before its length read as end of file, and one that stopped sending blocked the read forever. Both now reopen at the byte reached, as the curl source already did for a cut transfer. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Tiago Pereira <[email protected]>
…e file A direct-play body that stops below its Content-Length and that every ranged reopen at that byte answers with nothing used to fall through to AVERROR_EOF once the per-call heal budget ran out: the demuxer ended, EOS was pushed "at true EOF" and the player sat at "Playing (stalled)". read_cb now reports it as AVERROR_IO with io_failed set, so frame_read_failed raises demux_io_failed for the pump to answer. The heal budget is now per byte offset across read_cb calls (HealBudget): libavformat retries a failed read with a fresh call, which gave each retry a fresh budget (nine reopens in the field log). A read that delivers bytes refills it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Tiago Pereira <[email protected]>
…at the wrong byte A progressive transcode (start.mkv) is read through the same AVIO with no length: it gets no silence deadline and no socket reopen, as before bodies were healed. A sized socket reopen must be a 206 starting at the byte asked for (or a 200 for byte 0); the net crate now exposes the response's Content-Range start (hs_range_start). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Opt-in, default off: reproduce a direct-play body cut mid-transfer, and a server that ignores Range on the reopen, against the mock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it cuts drain_wire parks a reset or early close in io_failed while the demuxer waits on a full AU queue; read_cb then answered EIO before any reopen. Reopen at the byte reached, through one may_heal_at_offset predicate shared by every heal site. The mock's one-shot --cut-part-after slot is no longer spent by a HEAD or a short ranged read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RichiL10
added a commit
to RichiL10/plx-native
that referenced
this pull request
Oct 18, 2026
Brings in the upstream commits since 84759b9: - plxnative#822 HEVC: strip HDR10+ wherever it sits in an SEI NAL - plxnative#817 Direct play: recover a plain-http body that ends early, goes silent or cannot be crossed - plxnative#825 Dolby Vision P7 -> 8.1 (the fork's own b0856d6, squashed upstream with the author's resolution against plxnative#822) - plxnative#835 Hungarian UI language, plxnative#836 ARM binary size budget re-baseline, plxnative#666 webOS 1-3 opt-in interface resolution Conflict in rust-modules/media/src/ff.rs only: - the DV definitions and packet_to_annexb are taken from upstream, which is the author's own resolution of plxnative#825 against plxnative#822 (EL drop and RPU rewrite first, then strip_hdr10plus_sei); packet_to_annexb is now identical to upstream main - the fork keeps its video-copy remux fallback that arms the P7 conversion from the route's frozen source facts when PMS's Matroska remux omits the DOVI configuration record (remux_dv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before / After
Before: direct play over plain http had no recovery on the socket source. A server that closed the response before its Content-Length was read as the end of the file, and one that stopped sending without closing blocked the read forever. When a cut could not be crossed even by the curl source's ranged reopens, the demuxer still ended at
AVERROR_EOF, EOS was pushed "at true EOF", and the player sat at "Playing (stalled)" with no error.After: a plaintext body that ends early, or goes silent for 15 s, is reopened at the byte reached, the same way the curl source already healed a cut transfer. A cut that no reopen crosses is reported as a transport failure (
AVERROR_IOwithio_failed), soframe_read_failedraisesdemux_io_failedand the pump answers it instead of the stream silently ending.How
Two commits, both in
rust-modules/media/src/ff.rsread_cb:BODY_SILENCE, 15 s) when no other blocking deadline applies; a timeout, an error or a clean0below the length reopens throughseek_cbats.off(heal_at_offset).read_cbcall toAvioState::heal(HealBudget), counted per byte offset across calls. libavformat retries a failed read with a fresh call, so the per-call budget gave every retry three fresh reopens (nine in the field log I hit). A read that delivers bytes refills it. HLS segment reads (which carry an acquisition) are untouched.No FFI, linkage or new FFmpeg/curl calls.
Verification