Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / main / test / RTPFile.cc
index b886bde..b7f587b 100644 (file)
@@ -20,8 +20,9 @@
 
 #include "audio_coding_module.h"
 #include "engine_configurations.h"
-#include "gtest/gtest.h" // TODO (tlegrand): Consider removing usage of gtest.
 #include "rw_lock_wrapper.h"
+// TODO(tlegrand): Consider removing usage of gtest.
+#include "testing/gtest/include/gtest/gtest.h"
 
 namespace webrtc {
 
@@ -233,10 +234,10 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
   if (plen == 0) {
     return 0;
   }
-  if (payloadSize < (lengthBytes - 20)) {
+  if (lengthBytes < 20) {
     return 0;
   }
-  if (lengthBytes < 20) {
+  if (payloadSize < (lengthBytes - 20)) {
     return 0;
   }
   lengthBytes -= 20;