Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / neteq / decision_logic_normal.cc
index 97a8843..f238284 100644 (file)
@@ -67,10 +67,12 @@ Operations DecisionLogicNormal::GetDecisionSpecialized(
     return kNormal;
   }
 
+  const uint32_t five_seconds_samples = 5 * 8000 * fs_mult_;
   // Check if the required packet is available.
   if (target_timestamp == available_timestamp) {
     return ExpectedPacketAvailable(prev_mode, play_dtmf);
-  } else if (IsNewerTimestamp(available_timestamp, target_timestamp)) {
+  } else if (!PacketBuffer::IsObsoleteTimestamp(
+                 available_timestamp, target_timestamp, five_seconds_samples)) {
     return FuturePacketAvailable(sync_buffer, expand, decoder_frame_length,
                                  prev_mode, target_timestamp,
                                  available_timestamp, play_dtmf);