Fix up a couple of values related to encoding overhead.
authorColin Guthrie <pulse@colin.guthr.ie>
Tue, 3 Jun 2008 23:07:48 +0000 (23:07 +0000)
committerColin Guthrie <pulse@colin.guthr.ie>
Wed, 8 Oct 2008 19:32:09 +0000 (20:32 +0100)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2497 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/modules/module-raop-sink.c

index f78abba..96c98a6 100644 (file)
@@ -317,13 +317,13 @@ static void thread_func(void *userdata) {
                  * fully filled up. This is the best time to estimate
                  * the playback position of the server */
 
-                n = u->offset;
+                n = u->offset - u->encoding_overhead;
 
 #ifdef SIOCOUTQ
                 {
                     int l;
                     if (ioctl(u->fd, SIOCOUTQ, &l) >= 0 && l > 0)
-                        n -= l;
+                        n -= (l / u->encoding_ratio);
                 }
 #endif