rtpssrcdemux: drop unexpected RTCP packets
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 5 May 2009 14:48:37 +0000 (16:48 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 11 Aug 2009 01:30:41 +0000 (02:30 +0100)
We usually only get SR packets in our chain function but if an invalid packet
contains the SR packet after the RR packet, we must not fail but simply ignore
the malformed packet.

Fixes #581375

gst/rtpmanager/gstrtpssrcdemux.c

index 64394c4..b9a279c 100644 (file)
@@ -483,7 +483,7 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstBuffer * buf)
           NULL);
       break;
     default:
-      goto invalid_rtcp;
+      goto unexpected_rtcp;
   }
 
   GST_DEBUG_OBJECT (demux, "received RTCP of SSRC %08x", ssrc);
@@ -511,6 +511,12 @@ invalid_rtcp:
     gst_buffer_unref (buf);
     return GST_FLOW_ERROR;
   }
+unexpected_rtcp:
+  {
+    GST_DEBUG_OBJECT (demux, "dropping unexpected RTCP packet");
+    gst_buffer_unref (buf);
+    return GST_FLOW_OK;
+  }
 create_failed:
   {
     GST_ELEMENT_ERROR (demux, STREAM, DECODE, (NULL),