X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=6dac43d79a61a8d3b7d041c406af2eed61b14028;hp=a73b18e0596427dd2c24a31c4668d42c708ce572;hb=f7212adf2159341127331436d2ddc9e1f7a21563;hpb=452c770acfd3aa3e1bae29ae35a62566c740e044 diff --git a/afs.c b/afs.c index a73b18e0..6dac43d7 100644 --- a/afs.c +++ b/afs.c @@ -313,7 +313,7 @@ static struct timeval *afs_compute_timeout(void) if (chk_barrier("eof", &now, &eof_barrier, &the_timeout, 1) < 0) return &the_timeout; if (chk_barrier("data send", &now, &data_send_barrier, - &the_timeout, 1) < 0) + &the_timeout, 1) < 0) return &the_timeout; if (mmd->audio_format < 0 || !afs_playing() || !audio_file) return NULL; @@ -398,10 +398,9 @@ again: senders[i].shutdown_clients(); if (af) { struct timeval now; - if (!afs_paused() || mmd->chunks_sent) { - gettimeofday(&now, NULL); + gettimeofday(&now, NULL); + if (!afs_paused() || mmd->chunks_sent) tv_add(&af->eof_tv, &now, &eof_barrier); - } if (afs_repos()) tv_add(&now, &announce_tv, &data_send_barrier); if (mmd->new_afs_status_flags & AFS_NOMORE) @@ -415,7 +414,7 @@ again: mmd->new_afs_status_flags &= ~(AFS_REPOS); mmd->current_chunk = mmd->repos_request; } - ret = afs_compute_timeout(); + ret = afs_compute_timeout(); if (!ret && !audio_file && afs_playing() && !(mmd->new_afs_status_flags & AFS_NOMORE)) { PARA_DEBUG_LOG("%s", "ready and playing, but no audio file\n");