From 6d2368f4c666909784d49ad698d941855ecdd78e Mon Sep 17 00:00:00 2001 From: q191201771 <191201771@qq.com> Date: Thu, 25 Jun 2020 17:14:44 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20hls=E5=86=99ts=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E6=B5=81=E4=B8=AD=E6=B2=A1?= =?UTF-8?q?=E6=9C=89spspps=E5=AF=BC=E8=87=B4=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/hls/muxer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/hls/muxer.go b/pkg/hls/muxer.go index fafff73..19735a3 100644 --- a/pkg/hls/muxer.go +++ b/pkg/hls/muxer.go @@ -245,7 +245,11 @@ func (m *Muxer) cacheSPSPPS(msg rtmp.AVMsg) { } func (m *Muxer) appendSPSPPS(out []byte) []byte { - // TODO chef: 检查spspps是否存在 + if m.spspps == nil { + nazalog.Warnf("append spspps by not exist. [%s]", m.UniqueKey) + return out + } + index := 10 nnals := m.spspps[index] & 0x1f index++