mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-16 05:55:09 +00:00
fix(ism): emit two stsd entries so sample_description_index 2 resolves
Smooth fragments set tfhd sample_description_index=2 against a server init carrying a second, identical sample entry. A lone entry left that dangling: mp4decrypt skipped every such fragment silently and demuxers stopped after the first, yielding a file that looked fine but was almost entirely encrypted.
This commit is contained in:
@@ -773,7 +773,10 @@ def build_init_segment(
|
||||
else:
|
||||
raise NotImplementedError(f"Unsupported text FourCC: {fourcc}")
|
||||
|
||||
stsd = full_box(b"stsd", 0, 0, u32.pack(1) + sample_entry_box)
|
||||
# Fragments may set tfhd sample_description_index=2 (server inits carry a second,
|
||||
# identical entry). A lone entry leaves that dangling: mp4decrypt skips those
|
||||
# fragments and demuxers stop after the first.
|
||||
stsd = full_box(b"stsd", 0, 0, u32.pack(2) + sample_entry_box * 2)
|
||||
|
||||
# --- empty sample tables (fragmented: real samples live in moof/traf) ---
|
||||
stbl = box(
|
||||
|
||||
Reference in New Issue
Block a user