kopia lustrzana https://github.com/ryukoposting/Signal-Android
rodzic
85ea7e1bf4
commit
8f256fa285
|
@ -26,6 +26,11 @@ RtpPacket* RtpAudioReceiver::receive(char* encodedData, int encodedDataLen) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (received < RtpPacket::getMinimumSize()) {
|
||||
__android_log_print(ANDROID_LOG_WARN, TAG, "recveived malformed packet!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RtpPacket *packet = new RtpPacket(encodedData, received);
|
||||
|
||||
if (srtpStream.decrypt(*packet, sequenceCounter.convertNext(packet->getSequenceNumber())) != 0) {
|
||||
|
|
|
@ -21,6 +21,10 @@ public:
|
|||
RtpPacket(char *payload, int payloadLen, int sequenceNumber, int timestamp);
|
||||
~RtpPacket();
|
||||
|
||||
static int getMinimumSize() {
|
||||
return sizeof(RtpHeader);
|
||||
}
|
||||
|
||||
uint16_t getSequenceNumber();
|
||||
int getPayloadType();
|
||||
uint32_t getTimestamp();
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue