X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=vss.c;h=2e952eb4c6a1b0202a69ae79e0bab9a153fd0b04;hb=edeb499676e6d042ef1a913914a9fcb45a8cadde;hp=25082834eb0160de013dd11639f3354160ee261b;hpb=e56d454fbd865f34cb5e043ff43585754631b079;p=paraslash.git diff --git a/vss.c b/vss.c index 25082834..2e952eb4 100644 --- a/vss.c +++ b/vss.c @@ -215,20 +215,20 @@ static void write_fec_header(struct fec_client *fc, struct vss_task *vsst) memset(buf + 24, 0, 7); } -static int need_audio_header(struct fec_client *fc, struct vss_task *vsst) +static bool need_audio_header(struct fec_client *fc, struct vss_task *vsst) { if (!mmd->current_chunk) { tv_add(now, &vsst->header_interval, &fc->next_header_time); - return 0; + return false; } if (!vsst->header_buf) - return 0; - if (!vsst->header_len) - return 0; + return false; + if (vsst->header_len == 0) + return false; if (fc->group.num && tv_diff(&fc->next_header_time, now, NULL) > 0) - return 0; + return false; tv_add(now, &vsst->header_interval, &fc->next_header_time); - return 1; + return true; } static int num_slices(long unsigned bytes, int mps, int rs) @@ -283,8 +283,7 @@ static int initialize_fec_client(struct fec_client *fc, struct vss_task *vsst) if (ret < 0) goto err; hs = ret; - ret = num_slices(afh_get_largest_chunk_size(&mmd->afd.afhi), - mps, rs); + ret = num_slices(mmd->afd.max_chunk_size, mps, rs); if (ret < 0) goto err; ds = ret;