[Live-devel] [PATCH] MultiFramedRTPSource: Skip empty packages

Julian Scheel julian at jusst.de
Thu Jun 18 05:59:55 PDT 2015


If a package without any payload is received, drop it. This avoids parser
errors in consuming modules which expect to get some data at least. For
example some SAT>IP servers send an empty (header only) RTP packet on startup,
which previously caused live555 to immediately close the connection.

Signed-off-by: Julian Scheel <julian at jusst.de>
---
 liveMedia/MultiFramedRTPSource.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/liveMedia/MultiFramedRTPSource.cpp b/liveMedia/MultiFramedRTPSource.cpp
index 04adf66..4742d3a 100644
--- a/liveMedia/MultiFramedRTPSource.cpp
+++ b/liveMedia/MultiFramedRTPSource.cpp
@@ -138,6 +138,10 @@ void MultiFramedRTPSource::doGetNextFrame1() {
     BufferedPacket* nextPacket
       = fReorderingBuffer->getNextCompletedPacket(packetLossPrecededThis);
     if (nextPacket == NULL) break;
+    if (nextPacket->dataSize() == 0) {
+      fReorderingBuffer->releaseUsedPacket(nextPacket);
+      break;
+    }
 
     fNeedDelivery = False;
 
-- 
2.4.3




More information about the live-devel mailing list