chiark / gitweb /
RTP player now ignores packets with "X" bit set
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 26 Oct 2008 13:37:00 +0000 (13:37 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 26 Oct 2008 13:37:00 +0000 (13:37 +0000)
clients/playrtp.c
lib/rtp.h

index 0875a69ecc1713129cbb7b7b4f7585ee71d78feb..aca1532f52f657da8248f1d3fdf7dcb6c757fff5 100644 (file)
@@ -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;
index d0ab1ed3eaa50593ed8d42ac76119c897740336e..b923fda3c7b60f7358ff81f48bb9513a45b13290 100644 (file)
--- a/lib/rtp.h
+++ b/lib/rtp.h
@@ -28,6 +28,8 @@
  *
  * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
  * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
+ *
+ * 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 <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
+ * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
+ *
+ * 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 */
 
 /*