diff --git a/revid/config.go b/revid/config.go index e87eb53d..1ff69e1d 100644 --- a/revid/config.go +++ b/revid/config.go @@ -137,7 +137,6 @@ func (c *Config) Validate(r *Revid) error { switch c.Input { case Raspivid: case File: - c.Logger.Log(smartlogger.Info, pkg+"Using file input", "input") case NothingDefined: c.Logger.Log(smartlogger.Warning, pkg+"no input type defined, defaulting", "input", defaultInput) @@ -161,7 +160,6 @@ func (c *Config) Validate(r *Revid) error { return errors.New("bad bitrate and quantization combination for H264 input") } } - c.Logger.Log(smartlogger.Info, pkg+"Reading h264 codec", "inputCodec") case Mjpeg: if c.Quantization != "" { quantization, err := strconv.Atoi(c.Quantization) diff --git a/revid/revid.go b/revid/revid.go index 60a1d367..fde3efb7 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -391,6 +391,7 @@ loop: } } } + r.destination.release() r.config.Logger.Log(smartlogger.Debug, pkg+"done reading that clip from ring buffer") @@ -488,6 +489,7 @@ func (r *Revid) setupInputForFile() error { return err } defer f.Close() + // TODO(kortschak): Maybe we want a context.Context-aware parser that we can stop. return r.lexTo(r.encoder, f, delay) } diff --git a/revid/senders.go b/revid/senders.go index 940a9c14..9bf37e05 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -298,8 +298,7 @@ type udpSender struct { chunk *ring.Chunk } -func newUdpSender(addr string, log func(lvl int8, msg string, - args ...interface{})) (*udpSender, error) { +func newUdpSender(addr string, log func(lvl int8, msg string, args ...interface{})) (*udpSender, error) { conn, err := net.Dial("udp", addr) if err != nil { diff --git a/stream/mts/encoder.go b/stream/mts/encoder.go index 0cab8165..8c6bce27 100644 --- a/stream/mts/encoder.go +++ b/stream/mts/encoder.go @@ -207,7 +207,7 @@ func (e *Encoder) Encode(nalu []byte) error { return err } } - e.psiCount -= 1 + e.psiCount-- // Prepare PES data. pesPkt := pes.Packet{ StreamID: streamID, diff --git a/stream/rtp/encoder.go b/stream/rtp/encoder.go index 6ce2d1b4..eb6e404e 100644 --- a/stream/rtp/encoder.go +++ b/stream/rtp/encoder.go @@ -114,6 +114,6 @@ func (e *Encoder) nxtTimestamp() uint32 { // nxtSeqNo gets the next rtp packet sequence number func (e *Encoder) nxtSeqNo() uint16 { - e.seqNo += 1 + e.seqNo++ return e.seqNo - 1 }