Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2763813003: Allow padding packet in video streams. (Closed)
Patch Set: Added comment. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/video/rtp_stream_receiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_stream_receiver.cc
diff --git a/webrtc/video/rtp_stream_receiver.cc b/webrtc/video/rtp_stream_receiver.cc
index c2e99507a7842f3968a83d2dd5435b46981d30db..499ee0953e69ed90e6f2de6d1d14af47d79e5ace 100644
--- a/webrtc/video/rtp_stream_receiver.cc
+++ b/webrtc/video/rtp_stream_receiver.cc
@@ -250,6 +250,14 @@ int32_t RtpStreamReceiver::OnReceivedPayloadData(
packet.timesNacked =
nack_module_ ? nack_module_->OnReceivedPacket(packet) : -1;
+ // In the case of a video stream without picture ids and no rtx the
+ // RtpFrameReferenceFinder will need to know about padding to
+ // correctly calculate frame references.
+ if (packet.sizeBytes == 0) {
+ reference_finder_->PaddingReceived(packet.seqNum);
+ return 0;
+ }
+
if (packet.codec == kVideoCodecH264) {
// Only when we start to receive packets will we know what payload type
// that will be used. When we know the payload type insert the correct
« no previous file with comments | « no previous file | webrtc/video/rtp_stream_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698