srtpdec: Lower severity of srtp_err_status_replay_fail
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>
Fri, 15 Mar 2019 10:19:03 +0000 (11:19 +0100)
committerJan Alexander Steffens (heftig) <jsteffens@make.tv>
Tue, 19 Mar 2019 15:04:07 +0000 (16:04 +0100)
AFAIU this happens when encountering retransmissions. Don't print a
warning for these packets.

ext/srtp/gstsrtp.h
ext/srtp/gstsrtpdec.c

index f647526..62c6727 100644 (file)
@@ -72,6 +72,7 @@
 #  define srtp_err_status_t err_status_t
 #  define srtp_err_status_ok err_status_ok
 #  define srtp_err_status_bad_param err_status_bad_param
+#  define srtp_err_status_replay_fail err_status_replay_fail
 #  define srtp_err_status_key_expired err_status_key_expired
 #  define srtp_err_status_auth_fail err_status_auth_fail
 #  define srtp_err_status_cipher_fail err_status_cipher_fail
index 88d1cd4..4ecef54 100644 (file)
@@ -1387,6 +1387,10 @@ unprotect:
     case srtp_err_status_ok:
       /* success! */
       break;
+    case srtp_err_status_replay_fail:
+      GST_INFO_OBJECT (filter,
+          "Dropping replayed packet, probably retransmission");
+      goto err;
     case srtp_err_status_key_expired:{
       GstSrtpDecSsrcStream *stream;
 
@@ -1401,7 +1405,7 @@ unprotect:
       stream = request_key_with_signal (filter, ssrc, SIGNAL_HARD_LIMIT);
       GST_OBJECT_LOCK (filter);
 
-      /* Check we have a new stream for the key request */
+      /* Check the key request created a new stream */
       if (stream == NULL) {
         GST_WARNING_OBJECT (filter, "Hard limit reached, no new key, dropping");
         goto err;