MKV parser loops forever on unknown-size or truncated segments
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- macos, swift
- Ambito
- backend, operating-systems
Direzione di ricerca
Start with MKVFileHandler.tryParseElement and the parseTrackEntry loops, then trace MKVTrackParser.extractTrackData and locateCluster. Check how element sizes and EOF are represented, and run the relevant parser tests if available. Done means EOF terminates parsing, unknown sizes and child loops respect their parent bounds, and missing clusters end the loop; an open pull request (#103) is already linked.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
MKVFileHandler.tryParseElement never returns nil; at EOF readVINT returns 0, so it yields (0, 0).
In MKVTrackParser.extractTrackData, when locateCluster() returns nil (EOF) the loop does continue, but the offset is still < segmentEndOffset, so it spins forever. This happens for:
- unknown-size Segments (all-ones VINT, read as 2^56-1), which live/streamed MKVs (OBS, ffmpeg piping) write;
- truncated files whose Segment size exceeds the file.
The while let … = tryParseElement() loops in parseTrackEntry (both the main one and the CodecPrivate search) are not bounded by the TrackEntry size either, so a TrackEntry missing an expected element runs into the next entry or to EOF and spins on (0, 0).
Fix: make tryParseElement return nil at EOF, treat unknown sizes as "until parent end / EOF", bound child loops by the parent element's end, and break instead of continue when no cluster is found.
- Lingua principale
- Swift
- Stelle
- 42
- Fork
- 9
- Merge medio
- 9h 30m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ecdye/macSubtitleOCR
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ecdye/macSubtitleOCR#98 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ecdye/macSubtitleOCR#97 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ecdye/macSubtitleOCR#95 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ecdye/macSubtitleOCR#94 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ecdye/macSubtitleOCR#87 ·
Tutte le issue di ecdye/macSubtitleOCR
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
arkavo-org/VRMMetalKit#493 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
SwiftOldDriver/iOS-Weekly#5527 ·
I maintainer di solito rispondono entro 1 giorno
-
iOS UI: InboxUITests snooze test loses the Unsnooze button to the Inbox pollForse già presa @yuaanlin l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
[Cable Report] Apple Thunderbolt 3 Pro Cable 2 m (active), Apple Store, USB 3.2 Gen 2 (10 Gbps)Apertacable-report
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
darrylmorley/whatcable#681 ·
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionForse già presa @ragavendranbala-TSL l’ha presa oggi. ApertaNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
firebase/flutterfire#19015 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni