Skip to content

Commit

Permalink
Merge pull request #104 from allenporter/hls-muxer-crash
Browse files Browse the repository at this point in the history
Crash fix: Guard against null hlsMuxer
  • Loading branch information
allenporter authored Feb 20, 2022
2 parents 13978bd + 9bae352 commit 6d3ab26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storageStreamChannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func (obj *StorageST) HlsMuxerWritePacket(uuid string, channelID string, packet
obj.mutex.RLock()
defer obj.mutex.RUnlock()
if tmp, ok := obj.Streams[uuid]; ok {
if channelTmp, ok := tmp.Channels[channelID]; ok {
if channelTmp, ok := tmp.Channels[channelID]; ok && channelTmp.hlsMuxer != nil {
channelTmp.hlsMuxer.WritePacket(packet)
}
}
Expand Down

0 comments on commit 6d3ab26

Please sign in to comment.