vdk/codec/h264parser/parser_test.go

24 lines
422 B
Go
Raw Normal View History

2019-12-01 04:53:21 +08:00
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))
}