Skip to content

Commit

Permalink
Fix: flv writer no need wait group
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed May 18, 2024
1 parent 830844f commit fbea0cf
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions container/flv/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package flv
import (
"errors"
"io"
"sync"
"sync/atomic"

"github.com/zijiren233/livelib/av"
Expand All @@ -30,7 +29,6 @@ type Writer struct {
bufSize int

closed uint32
wg sync.WaitGroup
}

type WriterConf func(*Writer)
Expand Down Expand Up @@ -103,7 +101,6 @@ func (w *Writer) Close() error {
if !atomic.CompareAndSwapUint32(&w.closed, 0, 1) {
return av.ErrClosed
}
w.wg.Wait()
return nil
}

Expand Down

0 comments on commit fbea0cf

Please sign in to comment.