mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 04:12:24 -05:00
[chore]: Bump github.com/abema/go-mp4 from 1.1.1 to 1.2.0 (#2559)
This commit is contained in:
parent
a858831387
commit
605b2fde91
9 changed files with 170 additions and 5 deletions
20
vendor/github.com/abema/go-mp4/mp4.go
generated
vendored
20
vendor/github.com/abema/go-mp4/mp4.go
generated
vendored
|
|
@ -1,6 +1,7 @@
|
|||
package mp4
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
|
@ -19,6 +20,13 @@ func StrToBoxType(code string) BoxType {
|
|||
return BoxType{code[0], code[1], code[2], code[3]}
|
||||
}
|
||||
|
||||
// Uint32ToBoxType returns a new BoxType from the provied uint32
|
||||
func Uint32ToBoxType(i uint32) BoxType {
|
||||
b := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(b, i)
|
||||
return BoxType{b[0], b[1], b[2], b[3]}
|
||||
}
|
||||
|
||||
func (boxType BoxType) String() string {
|
||||
if isPrintable(boxType[0]) && isPrintable(boxType[1]) && isPrintable(boxType[2]) && isPrintable(boxType[3]) {
|
||||
s := string([]byte{boxType[0], boxType[1], boxType[2], boxType[3]})
|
||||
|
|
@ -92,6 +100,8 @@ func AddAnyTypeBoxDefEx(payload IAnyType, boxType BoxType, isTarget func(Context
|
|||
})
|
||||
}
|
||||
|
||||
var itemBoxFields = buildFields(&Item{})
|
||||
|
||||
func (boxType BoxType) getBoxDef(ctx Context) *boxDef {
|
||||
boxDefs := boxMap[boxType]
|
||||
for i := len(boxDefs) - 1; i >= 0; i-- {
|
||||
|
|
@ -100,6 +110,16 @@ func (boxType BoxType) getBoxDef(ctx Context) *boxDef {
|
|||
return boxDef
|
||||
}
|
||||
}
|
||||
if ctx.UnderIlst {
|
||||
typeID := int(binary.BigEndian.Uint32(boxType[:]))
|
||||
if typeID >= 1 && typeID <= ctx.QuickTimeKeysMetaEntryCount {
|
||||
return &boxDef{
|
||||
dataType: reflect.TypeOf(Item{}),
|
||||
isTarget: isIlstMetaContainer,
|
||||
fields: itemBoxFields,
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue