From 28f1495aaaf9ba4f1412aa006a5d48b7cf0d71db Mon Sep 17 00:00:00 2001 From: Richard Kettlewell Date: Sun, 26 Oct 2008 13:37:00 +0000 Subject: [PATCH] RTP player now ignores packets with "X" bit set --- clients/playrtp.c | 3 +++ lib/rtp.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/clients/playrtp.c b/clients/playrtp.c index 0875a69..aca1532 100644 --- a/clients/playrtp.c +++ b/clients/playrtp.c @@ -397,6 +397,9 @@ static void *listen_thread(void attribute((unused)) *arg) { timestamp, next_timestamp); continue; } + /* Ignore packets with the extension bit set. */ + if(header.vpxcc & 0x10) + continue; p->next = 0; p->flags = 0; p->timestamp = timestamp; diff --git a/lib/rtp.h b/lib/rtp.h index d0ab1ed..b923fda 100644 --- a/lib/rtp.h +++ b/lib/rtp.h @@ -28,6 +28,8 @@ * * See RFC1889 (now obsoleted * by RFC3550). + * + * All values in this structure are big-endian. */ struct attribute((packed)) rtp_header { /** @brief Version, padding, extension and CSRC @@ -61,6 +63,21 @@ struct attribute((packed)) rtp_header { uint32_t ssrc; }; +/** @brief RTP packet header format + * + * See RFC1889 (now obsoleted + * by RFC3550). + * + * All values in this structure are big-endian. + */ +struct attribute((packed)) rtp_extension { + /** @brief Profile-defined extension type */ + uint16_t type; + + /** @brief Length of rest of extension */ + uint16_t length; +}; + #endif /* RTP_H */ /* -- 2.11.0