mirror of https://bitbucket.org/ausocean/av.git
Added way to flush tsPacketChan
This commit is contained in:
parent
e04dd5c4ee
commit
043f48411c
|
@ -253,7 +253,11 @@ func (r *revidInst) input() {
|
|||
for {
|
||||
if clip, err := r.ringBuffer.Get(); err != nil {
|
||||
r.ErrOut(err.Error())
|
||||
time.Sleep(5*time.Second)
|
||||
tsPktChanLen := len(r.generator.GetTsOutputChan())
|
||||
for i := 0; i < tsPktChanLen; i++ {
|
||||
<-(r.generator.GetTsOutputChan())
|
||||
}
|
||||
time.Sleep(1*time.Second)
|
||||
} else {
|
||||
for {
|
||||
tsPacket := <-(r.generator.GetTsOutputChan())
|
||||
|
|
Loading…
Reference in New Issue