bluetooth: restart timer when write begin
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 5 Mar 2009 15:20:31 +0000 (17:20 +0200)
committerMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 5 Mar 2009 16:19:13 +0000 (18:19 +0200)
src/modules/bluetooth/module-bluetooth-device.c

index d5c2a87..3e09611 100644 (file)
@@ -1126,6 +1126,8 @@ static void thread_func(void *userdata) {
                 }
 
                 if (writable && do_write) {
+                    if (u->write_index == 0)
+                        u->started_at = pa_rtclock_usec();
 
                     if (u->profile == PROFILE_A2DP) {
                         if (a2dp_process_render(u) < 0)