From 53244aff0db7cdd32cfcfe3c5749903dcded60d2 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 7 Jan 2015 16:01:38 -0600 Subject: [PATCH 1/2] Don't fail if an unexpected rtp packet type is received --- src/zm_rtp_ctrl.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zm_rtp_ctrl.cpp b/src/zm_rtp_ctrl.cpp index 618d09f19..016a5ecfe 100644 --- a/src/zm_rtp_ctrl.cpp +++ b/src/zm_rtp_ctrl.cpp @@ -150,10 +150,15 @@ int RtpCtrlThread::recvPacket( const unsigned char *packet, ssize_t packetLen ) break; } case RTCP_RR : + { + Error( "Received RTCP_APP packet." ); + return( -1 ); + } default : { - Error( "Received unexpected packet type %d, ignoring", pt ); - return( -1 ); + // Ignore unknown packet types. Some cameras do this by design. + Debug( 5, "Received unexpected packet type %d, ignoring", pt ); + break; } } consumed = sizeof(uint32_t)*(len+1); From f1fa8a3d92aa57789029ab3b5e4bbea335afbeb2 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Thu, 8 Jan 2015 12:48:19 -0600 Subject: [PATCH 2/2] fix typo --- src/zm_rtp_ctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_rtp_ctrl.cpp b/src/zm_rtp_ctrl.cpp index 016a5ecfe..96d4fa2f5 100644 --- a/src/zm_rtp_ctrl.cpp +++ b/src/zm_rtp_ctrl.cpp @@ -151,7 +151,7 @@ int RtpCtrlThread::recvPacket( const unsigned char *packet, ssize_t packetLen ) } case RTCP_RR : { - Error( "Received RTCP_APP packet." ); + Error( "Received RTCP_RR packet." ); return( -1 ); } default :