chiark / gitweb /
playrtp junks old sample data in fill_buffer()
authorRichard Kettlewell <rjk@greenend.org.uk>
Mon, 24 Sep 2007 14:29:42 +0000 (15:29 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Mon, 24 Sep 2007 14:29:42 +0000 (15:29 +0100)
clients/playrtp.c

index c6260d9..33623ab 100644 (file)
@@ -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);