From 71d0eb3ca0718d90f2c57f5c8a985dafa3e8e981 Mon Sep 17 00:00:00 2001 From: ZSC714725 Date: Thu, 23 Mar 2023 09:20:29 +0800 Subject: [PATCH] rtmp2mpegts not support 711 --- pkg/remux/rtmp2mpegts.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/remux/rtmp2mpegts.go b/pkg/remux/rtmp2mpegts.go index 391e27a..42005fc 100644 --- a/pkg/remux/rtmp2mpegts.go +++ b/pkg/remux/rtmp2mpegts.go @@ -10,6 +10,8 @@ package remux import ( "encoding/hex" + "math" + "github.com/q191201771/lal/pkg/aac" "github.com/q191201771/lal/pkg/avc" "github.com/q191201771/lal/pkg/base" @@ -18,7 +20,6 @@ import ( "github.com/q191201771/naza/pkg/bele" "github.com/q191201771/naza/pkg/nazabytes" "github.com/q191201771/naza/pkg/nazalog" - "math" ) const ( @@ -183,6 +184,9 @@ func (s *Rtmp2MpegtsRemuxer) onPatPmt(b []byte) { func (s *Rtmp2MpegtsRemuxer) onPop(msg base.RtmpMsg) { switch msg.Header.MsgTypeId { case base.RtmpTypeIdAudio: + if msg.AudioCodecId() != base.RtmpSoundFormatAac { + return + } s.feedAudio(msg) case base.RtmpTypeIdVideo: s.feedVideo(msg)