From d031e1e646fcf8c41e6c3ba2e54c043867b39911 Mon Sep 17 00:00:00 2001 From: gemstone Date: Sat, 14 Dec 2024 01:31:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8DAnnexB?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=BD=A2=E5=BC=8F=E7=9A=84Nalu=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=AE=97=E6=B3=95=EF=BC=8C=E9=81=87=E5=88=B0"0x000000?= =?UTF-8?q?+=E9=9D=9E1"=E7=9A=84=E6=96=B9=E5=BC=8F=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=BA=94=E8=BF=9B=E8=A1=8C=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/xgplayer-transmuxer/src/codec/nalu.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/xgplayer-transmuxer/src/codec/nalu.js b/packages/xgplayer-transmuxer/src/codec/nalu.js index e75aef84..105b2e27 100644 --- a/packages/xgplayer-transmuxer/src/codec/nalu.js +++ b/packages/xgplayer-transmuxer/src/codec/nalu.js @@ -24,6 +24,9 @@ export class NALu { } else if (data[end - 2] !== 0) { end++ break + } else if (end < len - 1 && data[end + 1] !== 1) { + end++ + break } if (start !== end - 2) units.push(data.subarray(start, end - 2))