Skip to content

Commit

Permalink
Fix: receive hang indefinitely
Browse files Browse the repository at this point in the history
After writing the first bytes from buffer, it doesn't "notify" the reader
and continue to write to the buffer without knowing buffer is consume entirely or not.

The reader hence can send wrong data to receiver. With incorrect box size, it can hang forever.

`testpic` segment size is small (<65536), so it is not affected.
  • Loading branch information
nvkhoi112358 authored and tobbee committed Dec 30, 2024
1 parent 14e9f6d commit 50ac9db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/livesim2/app/cmaf-ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ func (cs *cmafSource) Write(b []byte) (int, error) {
if nrWritten == len(b) {
break
}
<-cs.writeMoreCh
}
return len(b), nil
}
Expand Down

0 comments on commit 50ac9db

Please sign in to comment.