From cb2d486888240438f4280bdc36ba894da6ec0f12 Mon Sep 17 00:00:00 2001 From: Jan Stabenow Date: Thu, 30 Jun 2022 19:05:26 +0200 Subject: [PATCH] Fix Malformed AAC bitstream detected for hls version 7 + array merge --- src/utils/restreamer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js index c2c8095..2fd6294 100644 --- a/src/utils/restreamer.js +++ b/src/utils/restreamer.js @@ -1524,6 +1524,10 @@ class Restreamer { ['method', 'PUT'], ]; case 7: + // fix Malformed AAC bitstream detected for hls version 7 + if (control.hls.version === 7 && output.options.includes('-codec:a') && output.options.includes('copy')) { + output.options.push('-bsf:a', 'aac_adtstoasc'); + } return [ ['f', 'hls'], ['start_number', '0'], @@ -1589,7 +1593,7 @@ class Restreamer { // WARN: It is a magic function. Returns 'Invalid process config' and the process.id is lost (Core v16.8.0) // output.address = hls_params; } else { - output.options.concat(hls_params); + output.options.push(...hls_params); } proc.output.push(output);