Add DCHECK to ensure that NetEq's packet buffer is not empty

This DCHECK ensures that one packet was inserted after the buffer was
flushed.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30169004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7719 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc
index f3d1a4f..5ec38d4 100644
--- a/modules/audio_coding/neteq/neteq_impl.cc
+++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -15,6 +15,7 @@
 
 #include <algorithm>
 
+#include "webrtc/base/checks.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/modules/audio_coding/neteq/accelerate.h"
 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
@@ -607,6 +608,8 @@
     new_codec_ = true;
     update_sample_rate_and_channels = true;
     LOG_F(LS_WARNING) << "Packet buffer flushed";
+    DCHECK(!packet_buffer_->Empty())
+        << "One packet must have been inserted after the flush.";
   } else if (ret != PacketBuffer::kOK) {
     LOG_FERR1(LS_WARNING, InsertPacketList, packet_list.size());
     PacketBuffer::DeleteAllPackets(&packet_list);