mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Incorrect use of two "int i" instances. (#3759)
This commit is contained in:
parent
73dd8af4c9
commit
fe38804e61
2 changed files with 7 additions and 5 deletions
8
trunk/3rdparty/srs-bench/pcap/main.go
vendored
8
trunk/3rdparty/srs-bench/pcap/main.go
vendored
|
@ -108,12 +108,14 @@ func doMain(ctx context.Context) error {
|
|||
}
|
||||
|
||||
if doRE {
|
||||
if previousTime != nil {
|
||||
if diff := ci.Timestamp.Sub(*previousTime); diff > 0 {
|
||||
if previousTime == nil {
|
||||
previousTime = &ci.Timestamp
|
||||
} else {
|
||||
if diff := ci.Timestamp.Sub(*previousTime); diff > 100*time.Millisecond {
|
||||
time.Sleep(diff)
|
||||
previousTime = &ci.Timestamp
|
||||
}
|
||||
}
|
||||
previousTime = &ci.Timestamp
|
||||
}
|
||||
|
||||
if doTrace {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue