diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc index 8f89a6cbfa..5a1b90be36 100644 --- a/video/rtp_video_stream_receiver.cc +++ b/video/rtp_video_stream_receiver.cc @@ -780,8 +780,6 @@ void RtpVideoStreamReceiver::OnInsertedPacket( max_nack_count = packet->times_nacked; min_recv_time = packet_info.receive_time().ms(); max_recv_time = packet_info.receive_time().ms(); - payloads.clear(); - packet_infos.clear(); } else { max_nack_count = std::max(max_nack_count, packet->times_nacked); min_recv_time = @@ -824,6 +822,8 @@ void RtpVideoStreamReceiver::OnInsertedPacket( last_packet.video_header.color_space, // RtpPacketInfos(std::move(packet_infos)), // std::move(bitstream))); + payloads.clear(); + packet_infos.clear(); } } RTC_DCHECK(frame_boundary); diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc index 2519da2b0a..78ab9a4266 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -731,8 +731,6 @@ void RtpVideoStreamReceiver2::OnInsertedPacket( max_nack_count = packet->times_nacked; min_recv_time = packet_info.receive_time().ms(); max_recv_time = packet_info.receive_time().ms(); - payloads.clear(); - packet_infos.clear(); } else { max_nack_count = std::max(max_nack_count, packet->times_nacked); min_recv_time = std::min(min_recv_time, packet_info.receive_time().ms()); @@ -772,6 +770,8 @@ void RtpVideoStreamReceiver2::OnInsertedPacket( last_packet.video_header.color_space, // RtpPacketInfos(std::move(packet_infos)), // std::move(bitstream))); + payloads.clear(); + packet_infos.clear(); } } RTC_DCHECK(frame_boundary);