From: Andre Noll Date: Sat, 24 Oct 2009 19:03:06 +0000 (+0200) Subject: vss: Fix computation of extra slices. X-Git-Tag: v0.4.0~6^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=3f9051d22fcf6e968259946eaf521ac3daac470e;hp=3f9051d22fcf6e968259946eaf521ac3daac470e vss: Fix computation of extra slices. On stream start we check in setup_next_fec_group() whether the FEC parameters requested by the client are sufficient for the current audio file. We want each FEC group contain at least one non-header slice. Since header slices can not contain any non-header data, the number of required slices is given by the number of slices needed for the header plus the number of slices needed for the largest chunk of the audio file. The current code gets this wrong because it computes the number of slices needed for the header plus the largest chunk, which may be strictly less than what is actually needed. IOW, the inequality num_slices(header + chunk) <= num_slices(header) + num_slices(chunk) may be strict. This bug could trigger the assertion assert(g->num_chunks) further down in setup_next_fec_group(). This patch fixes this bug and also changes a log message in udp_init_session() which always printed the requested FEC parameters, not considering extra slices. ---