1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine code, use size cache for performance issue.

This commit is contained in:
winlin 2015-08-14 15:51:02 +08:00
parent 3b0b2e0b85
commit afd05f71c3

View file

@ -311,7 +311,7 @@ int SrsMessageQueue::dump_packets(int max_count, SrsSharedPtrMessage** pmsgs, in
SrsSharedPtrMessage* last = omsgs[count - 1]; SrsSharedPtrMessage* last = omsgs[count - 1];
av_start_time = last->timestamp; av_start_time = last->timestamp;
if (count >= (int)msgs.size()) { if (count >= nb_msgs) {
// the pmsgs is big enough and clear msgs at most time. // the pmsgs is big enough and clear msgs at most time.
msgs.clear(); msgs.clear();
} else { } else {