mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
examples/client-read-h264: skip RTCP packets
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user