Browse Source

fix rtmp -> rtsp audio conversion (#932)

pull/956/head
aler9 3 years ago
parent
commit
13fb24da39
  1. 2
      internal/core/hls_source.go
  2. 2
      internal/core/rtmp_conn.go
  3. 2
      internal/core/rtmp_source.go
  4. 2
      internal/hls/client_audio_processor.go

2
internal/core/hls_source.go

@ -115,7 +115,7 @@ func (s *hlsSource) runInner() bool { @@ -115,7 +115,7 @@ func (s *hlsSource) runInner() bool {
if audioTrack != nil {
audioTrackID = len(tracks)
audioEnc = &rtpaac.Encoder{
PayloadType: 97,
PayloadType: 96,
SampleRate: audioTrack.ClockRate(),
SizeLength: 13,
IndexLength: 3,

2
internal/core/rtmp_conn.go

@ -460,7 +460,7 @@ func (c *rtmpConn) runPublish(ctx context.Context) error { @@ -460,7 +460,7 @@ func (c *rtmpConn) runPublish(ctx context.Context) error {
var aacEncoder *rtpaac.Encoder
if audioTrack != nil {
aacEncoder = &rtpaac.Encoder{
PayloadType: 97,
PayloadType: 96,
SampleRate: audioTrack.ClockRate(),
SizeLength: 13,
IndexLength: 3,

2
internal/core/rtmp_source.go

@ -144,7 +144,7 @@ func (s *rtmpSource) runInner() bool { @@ -144,7 +144,7 @@ func (s *rtmpSource) runInner() bool {
var aacEncoder *rtpaac.Encoder
if audioTrack != nil {
aacEncoder = &rtpaac.Encoder{
PayloadType: 97,
PayloadType: 96,
SampleRate: audioTrack.ClockRate(),
SizeLength: 13,
IndexLength: 3,

2
internal/hls/client_audio_processor.go

@ -78,7 +78,7 @@ func (p *clientAudioProcessor) doProcess( @@ -78,7 +78,7 @@ func (p *clientAudioProcessor) doProcess(
if !p.trackInitialized {
p.trackInitialized = true
track, err := gortsplib.NewTrackAAC(97, pkt.Type, pkt.SampleRate, pkt.ChannelCount, nil, 13, 3, 3)
track, err := gortsplib.NewTrackAAC(96, pkt.Type, pkt.SampleRate, pkt.ChannelCount, nil, 13, 3, 3)
if err != nil {
return err
}

Loading…
Cancel
Save