joy4/codec/h264parser/parser_test.go
Ingo Oppermann 01b5cd703f go fmt
2022-07-28 18:31:52 +02:00

22 lines
420 B
Go

package h264parser
import (
"encoding/hex"
"testing"
)
func TestParser(t *testing.T) {
var ok bool
var nalus [][]byte
annexbFrame, _ := hex.DecodeString("00000001223322330000000122332233223300000133000001000001")
nalus, ok = SplitNALUs(annexbFrame)
t.Log(ok, len(nalus))
avccFrame, _ := hex.DecodeString(
"00000008aabbccaabbccaabb00000001aa",
)
nalus, ok = SplitNALUs(avccFrame)
t.Log(ok, len(nalus))
}