fecdec: Use a fixed buffer pool size of 64K.
authorAndre Noll <maan@systemlinux.org>
Sun, 28 Nov 2010 21:43:45 +0000 (22:43 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 28 Nov 2010 21:52:03 +0000 (22:52 +0100)
With the new variable sized FEC slices, it may happen that the
number of bytes per slice of the first FEC group is very small. It is
therefore no longer appropriate to base the size of the buffer pool
on this quantity. It happened to be much too small (< 1000 bytes)
for one aac file which caused the fecdec filter to abort early due
to a full buffer pool.

This patch uses a fixed buffer pool size of 64K for the fecdec filter,
which ought to be enough for everybody.

fecdec_filter.c

index 30696c10f4d0f74d86f15fde206a6f976f41d715..d8b929760e6d450cf6412434f89f8c19438bd784 100644 (file)
@@ -414,7 +414,7 @@ static int dispatch_slice(char *buf, size_t len, struct fec_header *h,
        ret = fec_new(k, n, &pfd->fec);
        if (ret < 0)
                return ret;
-       pfd->btrp = btr_pool_new("fecdec", 20 * k *  h->slice_bytes);
+       pfd->btrp = btr_pool_new("fecdec", 64 * 1024);
        /* decode and clear the first group */
        ret = decode_group(pfd->first_complete_group, fn);
        if (ret < 0)