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 {
|
for {
|
||||||
if clip, err := r.ringBuffer.Get(); err != nil {
|
if clip, err := r.ringBuffer.Get(); err != nil {
|
||||||
r.ErrOut(err.Error())
|
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 {
|
} else {
|
||||||
for {
|
for {
|
||||||
tsPacket := <-(r.generator.GetTsOutputChan())
|
tsPacket := <-(r.generator.GetTsOutputChan())
|
||||||
|
|
Loading…
Reference in New Issue