chiark / gitweb /
playrtp junks old sample data in fill_buffer()
[disorder] / clients / playrtp.c
index fb897ce358e230c5e5852bdc5bf4c39e5663daae..33623ab3dcb4608e6d25ef8c285c20221a1c45b6 100644 (file)
@@ -294,7 +294,7 @@ static const struct option options[] = {
   { 0, 0, 0, 0 }
 };
 
-/** @Brief Return a new packet */
+/** @brief Return a new packet */
 static struct packet *new_packet(void) {
   struct packet *p;
   
@@ -481,6 +481,8 @@ static inline int contains(const struct packet *p, uint32_t timestamp) {
  * Must be called with @ref lock held.
  */
 static void fill_buffer(void) {
+  while(nsamples)
+    drop_first_packet();
   info("Buffering...");
   while(nsamples < readahead)
     pthread_cond_wait(&cond, &lock);