support cameras that doesn't provide indexlength/indexdeltalength

This commit is contained in:
aler9
2022-04-15 16:59:31 +02:00
parent efe7b064c3
commit b1674ff918

View File

@@ -145,6 +145,14 @@ func newTrackAACFromMediaDescription(
return nil, fmt.Errorf("sizelength is missing (%v)", v)
}
if track.indexLength == 0 && track.sizeLength == 13 {
track.indexLength = 3
}
if track.indexDeltaLength == 0 && track.sizeLength == 13 {
track.indexDeltaLength = 3
}
return track, nil
}