Problem
The Trun::encode_body_ext function always sets first_sample_flags: false,
even when the first sample has different flags than subsequent samples. This
results in inefficient encoding where all sample flags are written individually.
Expected Behavior
When the first sample has different flags (e.g., keyframe with 0x02000000
followed by regular frames with 0x01010000), the encoder should use the
first_sample_flags optimization to reduce file size.
Current Behavior
- Line 102:
first_sample_flags: false, (hardcoded)
- Line 115:
0u32.encode(buf)?; (TODO comment indicates known issue)