Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
williamlsh committed Feb 1, 2022
1 parent 0b5ab47 commit df44042
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/livestream/rtmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (h *handler) OnVideo(timestamp uint32, payload io.Reader) error {
outBuf = append(outBuf, annexBPrefix()...)
outBuf = append(outBuf, videoBuffer[offset:offset+bufferLength]...)

offset += int(bufferLength)
offset += bufferLength
}
case flvtag.AVCPacketTypeSequenceHeader:
const spsCountOffset = 5
Expand Down
4 changes: 2 additions & 2 deletions pkg/mqttclient/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// mqtt_client is an highly customized mqtt client build upon github.com/eclipse/paho.mqtt.golang.
// There are several diffrent client options for subscriber clients and publisher clients.
// There are several different client options for subscriber clients and publisher clients.
// Mainly, `opts.OnConnect`, `CleanSession` and `client.AddRoute` for subscribers.
package mqttclient

Expand Down Expand Up @@ -72,7 +72,7 @@ func NewClient(ctx context.Context, config ConfigOptions) mqtt.Client {
opts.AddBroker(config.Server)
opts.SetClientID(config.ClientID + "-" + uuid.NewString())

// Official suggestion: Unless ordered delivery of messages is essential (and you have configured your broker to support this e.g. max_inflight_messages=1 in mosquitto) then set ClientOptions.SetOrderMatters(false). Doing so will avoid the below issue (deadlocks due to blocking message handlers).
// Official suggestion: Unless ordered delivery of messages is essential (and you have configured your broker to support this e.g. max_inflight_messages=1 in mosquito) then set ClientOptions.SetOrderMatters(false). Doing so will avoid the below issue (deadlocks due to blocking message handlers).
opts.SetOrderMatters(false)
opts.SetCleanSession(false)
opts.SetUsername(config.Username)
Expand Down

0 comments on commit df44042

Please sign in to comment.