You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void SrsRtpFrameBuffer::ShiftSubsequentPackets(PacketIterator it,
int steps_to_shift)
{
if (it != packets_.end()) {
++it;
}
if (it == packets_.end()) {
return;
}
uint8_t* first_packet_ptr = const_cast<uint8_t*>((*it).dataPtr);
int shift_length = 0;
// Calculate the total move length and move the data pointers in advance.
for (; it != packets_.end(); ++it) {
shift_length += (*it).sizeBytes;
if ((*it).dataPtr != NULL) {
(*it).dataPtr += steps_to_shift;
}
}
memmove(first_packet_ptr + steps_to_shift, first_packet_ptr, shift_length);
}
The text was updated successfully, but these errors were encountered:
修正如下:
void SrsRtpFrameBuffer::ShiftSubsequentPackets(PacketIterator it,
int steps_to_shift)
{
if (it != packets_.end()) {
++it;
}
if (it == packets_.end()) {
return;
}
}
The text was updated successfully, but these errors were encountered: