| 386 | } |
| 387 | |
| 388 | int64_t MediaPacketQueue::ClearPacketBeforePTS(int64_t pts) |
| 389 | { |
| 390 | ADD_LOCK; |
| 391 | int dropCount = 0; |
| 392 | |
| 393 | while (mCurrent != mQueue.end()) { |
| 394 | IAFPacket *packet = (*mCurrent).get(); |
| 395 | |
| 396 | if (packet && packet->getInfo().pts < pts) { |
| 397 | PopFrontPacket(); |
| 398 | dropCount++; |
| 399 | } else { |
| 400 | break; |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | return dropCount; |
| 405 | } |
| 406 | |
| 407 | int64_t MediaPacketQueue::ClearPacketBeforeTimePos(int64_t pts) |
| 408 | { |
no test coverage detected