mirror of
https://github.com/encounter/joy4.git
synced 2026-03-30 11:18:33 -07:00
021f28e76c
git-subtree-dir: codec git-subtree-mainline:8b0ee7d5c2git-subtree-split:cef54937c5
24 lines
422 B
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))
|
|
}
|
|
|