From cfdd0c22d34c759136336e5e77cd98e9d14001e7 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 24 May 2016 14:08:24 -0600 Subject: muxcommon: fix check_realloc_output brainfart! --- libhb/muxcommon.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'libhb/muxcommon.c') diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 88a5f35bb..d8f5bbd3d 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -727,15 +727,8 @@ static int check_realloc_output(struct output_buf_s * output, int size) { uint8_t * tmp; - if (output->alloc == 0) - { - output->alloc = 1024; - } - else - { - output->alloc *= 2; - } - output->size = size; + output->alloc = size + 1024; + output->size = size; tmp = realloc(output->buf, output->alloc); if (tmp == NULL) { -- cgit v1.2.3