From 81486a60efa18a2771a51dc73a2b7adde8ab51f4 Mon Sep 17 00:00:00 2001 From: Kubo Ryosuke Date: Tue, 26 Apr 2022 02:43:52 +0900 Subject: [PATCH] fix README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c32a67..4a60c4a 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,12 @@ _, err := mp4.ReadBoxStructure(file, func(h *mp4.ReadHandle) (interface{}, error ```go // extract specific boxes -boxes, err := mp4.ExtractBox(file, nil, mp4.BoxPath{mp4.BoxTypeMoov(), mp4.BoxTypeTrak(), mp4.BoxTypeTkhd()}) +boxes, err := mp4.ExtractBoxWithPayload(file, nil, mp4.BoxPath{mp4.BoxTypeMoov(), mp4.BoxTypeTrak(), mp4.BoxTypeTkhd()}) if err != nil { : } for _, box := range boxes { - tkhd := box.(*mp4.Tkhd) + tkhd := box.Payload.(*mp4.Tkhd) fmt.Println("track ID:", tkhd.TrackID) } ```