You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
joy4/codec/h264parser/parser_test.go

24 lines
422 B
Go

package h264parser
import (
"testing"
"encoding/hex"
)
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))
}