From e908ea4515b36e37f70bfffde83f43ffc26d9009 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 28 Nov 2010 22:43:45 +0100 Subject: [PATCH] fecdec: Use a fixed buffer pool size of 64K. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fecdec_filter.c b/fecdec_filter.c index 30696c10..d8b92976 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -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) -- 2.39.5