examples/client-read-h264: skip RTCP packets

This commit is contained in:
aler9
2021-07-03 11:53:33 +02:00
parent 88608152cc
commit 89494e8350

View File

@@ -39,7 +39,7 @@ func main() {
// read RTP frames
err = conn.ReadFrames(func(trackID int, streamType gortsplib.StreamType, payload []byte) {
if trackID == h264Track {
if streamType == gortsplib.StreamTypeRTP && trackID == h264Track {
// convert RTP frames into H264 NALUs
nalus, _, err := dec.Decode(payload)
if err != nil {