first commit
This commit is contained in:
23
codec/h264parser/parser_test.go
Normal file
23
codec/h264parser/parser_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user