diff options
| -rw-r--r-- | src/AVTInput.cpp | 8 | ||||
| -rw-r--r-- | src/AVTInput.h | 1 | 
2 files changed, 9 insertions, 0 deletions
diff --git a/src/AVTInput.cpp b/src/AVTInput.cpp index 955ca33..ab6be76 100644 --- a/src/AVTInput.cpp +++ b/src/AVTInput.cpp @@ -216,6 +216,14 @@ const uint8_t* AVTInput::_findDABFrameFromUDP(const uint8_t* buf, size_t size,              uint32_t version = (buf[index] & 0xC0) >> 6;              uint32_t payloadType = (buf[index+1] & 0x7F);              if (version == 2 && payloadType == 34) { +                const uint16_t seqnr = (buf[index+2] << 8) | buf[index+3]; +                if ((_previousRtpIndex != -1) and +                        (((_previousRtpIndex + 1) % 0xFFFF) != seqnr)) { +                    fprintf(stderr, "RTP sequence number jump from %d to %d\n", +                            _previousRtpIndex, seqnr); +                } +                _previousRtpIndex = seqnr; +  #if 0                  // If one wants to decode the RTP timestamp, here is some                  // example code. The AVT generates a timestamp which starts diff --git a/src/AVTInput.h b/src/AVTInput.h index 71805c7..294f48f 100644 --- a/src/AVTInput.h +++ b/src/AVTInput.h @@ -120,6 +120,7 @@ class AVTInput          std::vector<uint8_t> _currentFrame;          int32_t _nbFrames = 0;          int32_t _expectedFrameIndex = 0; +        int32_t _previousRtpIndex = -1;          std::chrono::system_clock::time_point _frameZeroTimestamp;          size_t _currentFrameSize = 0;  | 
