para_munmap(vsst->map, mmd->size);
vsst->map = NULL;
mmd->chunks_sent = 0;
- mmd->offset = 0;
+ //mmd->offset = 0;
mmd->afd.afhi.seconds_total = 0;
mmd->afd.afhi.chunk_tv.tv_sec = 0;
mmd->afd.afhi.chunk_tv.tv_usec = 0;
set_eof_barrier(vsst);
mmd->chunks_sent = 0;
} else if (vss_repos()) {
+ struct timeval offset;
tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier);
set_eof_barrier(vsst);
mmd->chunks_sent = 0;
mmd->current_chunk = mmd->repos_request;
mmd->new_vss_status_flags &= ~VSS_REPOS;
+ tv_scale(mmd->current_chunk, &mmd->afd.afhi.chunk_tv, &offset);
+ mmd->offset = tv2ms(&offset);
}
if (need_to_request_new_audio_file(vsst)) {
PARA_DEBUG_LOG("ready and playing, but no audio file\n");
size_t len;
if (!mmd->chunks_sent) {
- struct timeval tmp;
mmd->stream_start = *now;
- tv_scale(mmd->current_chunk, &mmd->afd.afhi.chunk_tv, &tmp);
- mmd->offset = tv2ms(&tmp);
mmd->events++;
}
/*