mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-23 15:08:32 +00:00
Update machinery/src/video/mp4.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5d745fc989
commit
32b471f570
@@ -80,7 +80,7 @@ func NewMP4(fileName string, spsNALUs [][]byte, ppsNALUs [][]byte, vpsNALUs [][]
|
||||
// Segments are ~FragmentDurationMs each, so:
|
||||
// numSegments = ceil(maxDurationSec * 1000 / FragmentDurationMs) + 1 (safety margin)
|
||||
// sidxSize = 24 + 12 * numSegments
|
||||
baseSize := int64(2048) // ftyp + moov + headroom
|
||||
baseSize := int64(2560) // ftyp + moov + extra headroom for large UUID signatures
|
||||
numSegments := int64(0)
|
||||
if maxDurationSec > 0 {
|
||||
// Use integer ceiling division to avoid underestimating the number of segments.
|
||||
|
||||
Reference in New Issue
Block a user