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 c6260d96eec8a31e8f896a88b7c3467c97249f7a..33623ab3dcb4608e6d25ef8c285c20221a1c45b6 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);