发布结束后释放ringbuffer锁,防止订阅者永久阻塞

This commit is contained in:
langhuihui
2021-02-09 21:19:13 +08:00
parent bada97f8ae
commit f535e973bc
3 changed files with 6 additions and 11 deletions

View File

@@ -76,7 +76,7 @@ func (ts *TS) run() {
spsHead := []byte{0xE1, 0, 0}
ppsHead := []byte{0x01, 0, 0}
nalLength := []byte{0, 0, 0, 0}
defer ts.AVRing.Done()
for {
select {
case <-ts.Done():