rtph264: support decoding STAP-A frames

This commit is contained in:
aler9
2021-03-07 20:54:11 +01:00
parent f5c2308431
commit 0b336c547c
4 changed files with 192 additions and 18 deletions

View File

@@ -40,12 +40,14 @@ func main() {
// get H264 NALUs of that track
err = <-conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
if trackID == h264Track {
nt, err := dec.Decode(buf)
nts, err := dec.Decode(buf)
if err != nil {
return
}
fmt.Printf("received H264 NALU of size %d\n", len(nt.NALU))
for _, nt := range nts {
fmt.Printf("received H264 NALU of size %d\n", len(nt.NALU))
}
}
})
panic(err)