mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
rtph264: support decoding STAP-A frames
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user