Repository navigation
Description
Summary
Remote ISO/UDF disc images behind extensionless HTTP proxy URLs bypass the disc adapter even when the response declares Content-Type: application/x-iso9660-image. The raw image reaches libavformat and fails with AVERROR_INVALIDDATA (-1094995529).
Observed on tvOS in Syncnext 1.198 (557), using AetherEngine 7.45.0, commit 52802af. The default-branch Demuxer.openHTTP still has the same extension-only gate at the time of reporting.
Reproduction shape
- Serve a supported Blu-ray/DVD ISO through an HTTP byte-range proxy at an opaque path such as
http://127.0.0.1:<port>/t4/play/<opaque-id>. - Preserve the actual binary image, valid byte ranges, total length, and
Content-Type: application/x-iso9660-image; the URL has no filename extension. - Call
engine.load(url: url, options: LoadOptions(...))as a non-live URL source. - Observe the ordinary AVIO reader being selected and demuxer open failing before container/stream analysis completes.
The production log shows:
admission: result=aether-default reason=confirmed-non-hls
sourceResolution=original nativeRemoteHLS=false isLive=false heldSourceConnection=true
MEDIA_REQUEST transport=avio-held-http1 range=bytes=0- response status=206
MEDIA_REQUEST finished bytes=1048576
MEDIA_REQUEST transport=avio-held-http1 range=bytes=0- response status=206
MEDIA_REQUEST finished bytes=1572864
HLSVideoEngine: open failed (Demuxer: open failed (Invalid data found when processing input (-1094995529)))
A separate post-failure diagnostic request to the same resource returned HTTP 206 and Content-Type: application/x-iso9660-image. These are sanitized excerpts; the original media, account information, and private proxy identifiers are omitted. This observation is from a downstream build with local integration patches, not a claimed pristine-upstream end-to-end fixture reproduction.
Source-level cause
Demuxer.isDiscImageURL accepts only URL extensions iso, img, and udf. openHTTP only constructs HTTPDiscIOReader / calls DiscReader.wrap when that predicate is true.
DiscReader already implements ISO9660/UDF structure recognition, but extensionless URL sources never reach it. The normal AVIOReader sends the entire disc filesystem to avformat_open_input as if it were an ordinary media container. The HTTP MIME declaration is not considered at this routing boundary.
Expected behavior
Treat the HTTP representation metadata as a disc-probe hint, including for URLs without an extension. Confirm any candidate with the existing ISO9660/UDF/BDMV/DVD structure readers before exposing a playable disc title. MIME alone is not proof of valid/playable disc contents.
Reuse the opening response or compatible prewarm information where possible; ordinary media should not incur a separate unconditional HEAD/range probe. Preserve existing authentication, redirects, range validation, cancellation, source identity, and live/sequential-origin semantics.
Regression coverage requested
- Extensionless HTTP URL + ISO MIME + valid disc structure reaches the disc adapter.
- MIME case/parameters are normalized.
- Ordinary extensionless MP4/MKV keeps the normal streaming path.
- A mislabelled non-disc response is not accepted as a playable disc.
- Existing suffix-based ISO recognition and cancellation/range errors retain their behavior.
Activity
🐛 fix(playback): 修復無副檔名 HTTP ISO 辨識
fix(demuxer): recognize a remote disc image on an extensionless URL b…
Merge fix/disc-media-type-860: recognize extensionless remote disc im…
superuser404notfound commentedon Oct 25, 2026
Thanks for the precise report and the source-level analysis, both were spot on.
Fixed on
mainin 5b8cc7c (fixd032cfa4), shipping with the next release:AVIOReaderkeeps theContent-Typeof the first 2xx answer the open already makes (or of an adopted prewarm, whose head response now carries it), so an extensionless URL costs no extra HEAD or range request.application/x-iso9660-image,application/x-cd-image,application/vnd.efi.iso,application/x-udf-image,application/x-raw-disk-image, with parameters, case and padding ignored.DiscReaderstill decides from the ISO 9660 / UDF structure, and a mislabelled body reopens as ordinary media.probe(limits/cancellation) andupdateRequestHeaderstreat it like an.iso.Regression tests cover the cases listed in the issue: extensionless URL plus ISO type reaches the disc adapter (cold and prewarmed), type normalization, ordinary extensionless media keeps the streaming path, a mislabelled non-disc body is neither accepted as a disc nor remembered as one, and the controlled probe enables the disc probe from the response type.
Leaving this open until it is confirmed against the Syncnext proxy on a release build.
Merge PR #818: preserve source failures and request ownership (thanks @…
superuser404notfound commentedon Oct 26, 2026
Released in 7.48.0 (263dc11). Leaving this open for the retest.
qoli commentedon Oct 29, 2026
7.52.0 follow-up: the declared-disc-MIME fix is present, but the extensionless
application/octet-streamcase still needs disc recognition.I checked release
db35d50e5c3d5b617551ca27ec7ef4a3d4e534e3(FFmpegBuild 3.11.0), which is also the current main head. We removed the downstream copies of the MIME/prewarm/known-disc-URL work you shipped in 7.48.0. Those are now owned by upstream.Remaining input shape
.iso,.imgor.udfsuffix.Content-Type: application/octet-stream(also mixed case plus parameters).The current
DiscImageMediaTypepredicate deliberately excludes generic MIME, and its tests assert that exclusion.Demuxer.openHTTPconsequently has neither a suffix/known-URL hint nor a declared-disc-type handoff for this fresh URL. It can hand the filesystem to the ordinary container probe without consulting the existing disc structure readers.This is a remaining input case, not a claim that your declared-MIME fix regressed. The unmodified-release gap here is established by the current routing code; the execution results below are explicitly from the downstream patched build.
Downstream reproduction and narrow fix
Our regression fixture serves a generated ISO9660 image at an opaque loopback URL, with the playable VOB placed at LBA 2048 (4 MiB). That placement prevents an accidental raw-container scan of a tiny fixture from looking like successful disc recognition. A successful open must set
isDiscSource, expose a disc title, and discover its video stream. A generated UDF/BDMV fixture covers the same generic-MIME case.The remaining local patch checks the ISO9660/UDF volume-descriptor identifier at sector 16 through the same opening AVIO buffer, restores the read position before ordinary media probing, and sends candidates through the existing
DiscReadervalidation.CD001/BEA01/NSR02/NSR03are hints, not proof of a playable disc. It does not classify every octet-stream body as a disc or add a separate unconditional HEAD / classification Range request.On the patched 7.52.0 build, regression cases pass for:
bytes=0-0classification request;A reporting-time rerun of the disc, bitmap-storage and off-main-subtitle suites passed all 18 Swift Testing tests (using the already-built patched test binary). This is synthetic demuxer coverage, not a claim of a fresh unmodified-release physical-device ISO playback test.
Could this buffered-signature case be covered upstream as the continuation of #860? We still need the small generic-MIME portion of downstream patch
0008until it is.Merge fix/860-octet-stream-disc-signature: an octet-stream disc image…
superuser404notfound commentedon Oct 30, 2026
Thanks for the follow-up and the fixture design, the 4 MiB VOB placement point is a good one.
Covered on
mainin 7b74f35 (fix73c93f5c), shipping with the next release:application/octet-stream(parameters, case and padding ignored) the open reads the volume descriptor identifier at sector 16 (CD001,BEA01,NSR02,NSR03) from bytes it already holds: the warm head, the probe reader's first chunk, or the opening window of the persistent connection (waiting at most 2 s for it on the same connection). No HEAD, nobytes=0-0, no extra classification range.DiscReaderstill decides, and a recognized URL is remembered for the process..isoURL still reports it.ProbeHTTPReader.discImageProbeEnabledturns on from the same verdict, so a controlled probe of an octet-stream ISO or UDF image runs the disc probe.binary/octet-stream, a missingContent-Type) are not sniffed; say if your proxy sends one of those.Tests cover octet-stream ISO (cold and warmed) reaching the disc adapter, octet-stream UDF and ISO enabling the controlled probe's disc probe, ordinary octet-stream media keeping the streaming path, and a signature-only body that is neither accepted nor remembered as a disc and still plays.
Leaving this open until it is confirmed against the Syncnext proxy on a release build, at which point downstream patch
0008should be droppable.fix(disc): recognize an octet-stream disc image by its sector-16 volu…
superuser404notfound commentedon Oct 30, 2026
Released in 7.53.0 (4a82484).
♻️ refactor(aether): 退役 0008 光碟辨識補丁
qoli commentedon Nov 6, 2026
Retested the original 22.54 GB Blu-ray ISO and the 43.92 GB ISO from our downstream follow-up through Syncnext’s normal T4 proxy on a physical Apple TV running tvOS 26.6.1. Both entries were resolved again from their original source and line.
The signed Syncnext 1.212 (579) build uses the project’s Release configuration, AetherEngine 7.56.0 (
76ad51a7), and FFmpegBuild 3.12.1. The app target uses its configured-OnoneRelease setting. Downstream disc patch0008has been retired.Content-Typeapplication/x-iso9660-imagedisc-titlechapters, 1920×1080 H.264,nativeAVPlayer. Landed at 600.000 s and continued playing through the 667.980 s observation.application/octet-streamdisc-titlechapters, 1920×1080 H.264,avKitProxy. The engine and AVKit carrier both landed at 600.000 s, and playback continued through the 750.150 s observation.Both runs logged
sourceResolution=original,heldSourceConnection=true, and an HTTP 206 response onavio-held-http1. I checked rendered video on the TV before and after each seek.Thanks for the fixes. Closing as completed.