mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 12:32:01 -08:00
fix crash that happened when publishing audio with RTMP (#810)
This commit is contained in:
parent
6c7fd8ee6f
commit
9c38b42b4c
1 changed files with 1 additions and 2 deletions
|
|
@ -254,7 +254,6 @@ func (c *rtmpConn) runRead(ctx context.Context) error {
|
|||
var h264Decoder *rtph264.Decoder
|
||||
var audioTrack *gortsplib.TrackAAC
|
||||
audioTrackID := -1
|
||||
var audioClockRate int
|
||||
var aacDecoder *rtpaac.Decoder
|
||||
|
||||
for i, track := range res.stream.tracks() {
|
||||
|
|
@ -434,7 +433,7 @@ func (c *rtmpConn) runRead(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
pts += 1000 * time.Second / time.Duration(audioClockRate)
|
||||
pts += 1000 * time.Second / time.Duration(audioTrack.ClockRate())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue