]> git.tuebingen.mpg.de Git - paraslash.git/commit - fecdec_filter.c
fecdec_filter: Detect and ingore duplicate slices.
authorAndre Noll <maan@systemlinux.org>
Sun, 23 May 2010 17:21:02 +0000 (19:21 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 23 May 2010 17:21:02 +0000 (19:21 +0200)
commit04d57a4d05ce0a0f8d16c32d14d056e312527808
treea9efc594e69c326330b69f64fcf861db73f77319
parentd482305cd2ffba049a7987a73d541c5b901a0d49
fecdec_filter: Detect and ingore duplicate slices.

This introduces a bit array to keep track of the slices of a FEC group
that have been received so far. This allows to quickly look up whether
the current slice is already present in the FEC group, in which case we
simply ignore it.

This avoids errors of the kind

unregister_task: unregistering fecdec (slot 0) (invalid index vector)

which have been observed with the UDP transport.

The patch also cleans up add_slice() a bit: It replaces the calls to para_malloc()
and memset() by a simple call to para_calloc() and initializes slice_num earlier
so that it can be used throughout the function.
fecdec_filter.c