X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fecdec_filter.c;h=376fe6b3cc66ab5965b05b1d479a7ba7b34fe0ed;hb=eea9d1cae30df921ae2fd1771518b8b21dbd0daf;hp=6ca0b037da0f55be826137facc4632415648329c;hpb=30496a3da233a6cfb0b1005b808e8d1064cb91ff;p=paraslash.git diff --git a/fecdec_filter.c b/fecdec_filter.c index 6ca0b037..376fe6b3 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -198,6 +198,8 @@ static int add_slice(char *buf, struct fecdec_group *fg) int r, slice_num; if (group_complete(fg)) { + PARA_DEBUG_LOG("group complete, ignoring slice %d\n", + fg->h.slice_num); fg->num_received_slices++; return 0; } @@ -285,14 +287,8 @@ static int dispatch_slice(char *buf, size_t len, struct fec_header *h, ret = get_group(h, pfd, &fg); if (ret < 0) return ret; - if (group_complete(fg)) { - PARA_DEBUG_LOG("group complete, ignoring slice %d\n", - h->slice_num); + if (!add_slice(buf, fg)) return 1; - } - ret = add_slice(buf, fg); - if (ret < 0) - return ret; if (group_complete(fg)) { if (!pfd->fec) { int k = h->data_slices_per_group, n = h->slices_per_group;