unsigned slice_bytes;
uint32_t max_data_size;
- if (fc->first_stream_chunk < 0) {
+ if (fc->state == FEC_STATE_NONE) {
ret = initialize_fec_client(fc, vsst);
if (ret < 0)
return ret;
static int compute_next_fec_slice(struct fec_client *fc, struct vss_task *vsst)
{
- if (fc->first_stream_chunk < 0 || fc->current_slice_num
+ if (fc->state == FEC_STATE_NONE || fc->current_slice_num
== fc->fcp->slices_per_group + fc->num_extra_slices) {
int ret = setup_next_fec_group(fc, vsst);
if (ret == 0)
struct timeval tmp, next;
int ret;
- if (fc->first_stream_chunk < 0)
+ if (fc->state == FEC_STATE_NONE)
return 1;
tv_scale(fc->current_slice_num, &fc->group.slice_duration, &tmp);
tv_add(&tmp, &fc->group.start, &next);
for (i = 0; senders[i].name; i++)
if (senders[i].shutdown_clients)
senders[i].shutdown_clients();
- list_for_each_entry_safe(fc, tmp, &fec_client_list, node) {
- fc->first_stream_chunk = -1;
+ list_for_each_entry_safe(fc, tmp, &fec_client_list, node)
fc->state = FEC_STATE_NONE;
- }
mmd->stream_start.tv_sec = 0;
mmd->stream_start.tv_usec = 0;
}
case FEC_STATE_DISABLED:
continue;
case FEC_STATE_NONE:
- fc->first_stream_chunk = -1; /* need setup */
- /* fall through */
case FEC_STATE_READY_TO_RUN:
break;
}