Skip to content

Commit

Permalink
fix single aac file rtmp publish error.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzp1984 committed Jun 1, 2024
1 parent f4b7f14 commit c4ea3d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/protocols/rtmp/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ func tracksFromMetadata(conn *Conn, payload []interface{}) (format.Format, forma
}

if audioTrack == nil {
if len(msg.Payload) == 0 {
continue
}
switch {
case msg.Codec == message.CodecMPEG4Audio &&
msg.AACType == message.AudioAACTypeConfig:
Expand Down

0 comments on commit c4ea3d5

Please sign in to comment.