fix:部分aac下载失败

This commit is contained in:
itouakirai
2025-09-30 21:35:12 +08:00
parent 9c6569e239
commit 17486d221e
3 changed files with 3 additions and 5 deletions

View File

@@ -624,7 +624,6 @@ func cbcsDecryptSamples(samples []mp4.FullSample, conn *bufio.ReadWriter,
func DecryptFragment(frag *mp4.Fragment, tracks map[uint32]mp4.DecryptTrackInfo, conn *bufio.ReadWriter) error {
moof := frag.Moof
var bytesRemoved uint64 = 0
var sxxxBytesRemoved uint64
for _, traf := range moof.Trafs {
ti, ok := tracks[traf.Tfhd.TrackID]
@@ -675,9 +674,6 @@ func DecryptFragment(frag *mp4.Fragment, tracks map[uint32]mp4.DecryptTrackInfo,
}
bytesRemoved += traf.RemoveEncryptionBoxes()
// remove sbgp and sgpd
traf.Children, sxxxBytesRemoved = FilterSbgpSgpd(traf.Children)
bytesRemoved += sxxxBytesRemoved
}
_, psshBytesRemoved := moof.RemovePsshs()
bytesRemoved += psshBytesRemoved