Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / session / media / bundlefilter.cc
index 0d7927c..1d2a031 100755 (executable)
@@ -27,8 +27,8 @@
 
 #include "talk/session/media/bundlefilter.h"
 
-#include "talk/base/logging.h"
 #include "talk/media/base/rtputils.h"
+#include "webrtc/base/logging.h"
 
 namespace cricket {
 
@@ -47,6 +47,10 @@ bool BundleFilter::DemuxPacket(const char* data, size_t len, bool rtcp) {
   // |streams_| is empty, we will allow all rtcp packets pass through provided
   // that they are valid rtcp packets in case that they are for early media.
   if (!rtcp) {
+    // It may not be a RTP packet (e.g. SCTP).
+    if (!IsRtpPacket(data, len))
+      return false;
+
     int payload_type = 0;
     if (!GetRtpPayloadType(data, len, &payload_type)) {
       return false;