Bug 1255371 - Invalid RTCP SR sent by Firefox when h264 is used; r?jesup
Setting the capture_time_ms to -1 causes RTCPSender::SetLastRtpTime to ignore
it and use the current clock time. The default value of 0 will be used in the
the calculation in RTCPSender::BuildSR and cause mismatched timestamps.
MozReview-Commit-ID: IK8lLK8Rmla
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -641,23 +641,24 @@ WebrtcGmpVideoEncoder::Encoded(GMPVideoE
for (size_t i = 0; i < num_nals; i++) {
fragmentation.fragmentationOffset[i] = nals[i].offset;
fragmentation.fragmentationLength[i] = nals[i].size;
}
webrtc::EncodedImage unit(aEncodedFrame->Buffer(), size, size);
unit._frameType = ft;
unit._timeStamp = timestamp;
+ // Ensure we ignore this when calculating RTCP timestamps
+ unit.capture_time_ms_ = -1;
unit._completeFrame = true;
// TODO: Currently the OpenH264 codec does not preserve any codec
// specific info passed into it and just returns default values.
- // Even if we were to add packetization mode to the codec specific info
- // the value passed in would not be returned to us. If this changes in
- // the future, it would be nice to get rid of mCodecSpecificInfo.
+ // If this changes in the future, it would be nice to get rid of
+ // mCodecSpecificInfo.
mCallback->Encoded(unit, &mCodecSpecificInfo, &fragmentation);
}
}
}
// Decoder.
WebrtcGmpVideoDecoder::WebrtcGmpVideoDecoder() :
mGMP(nullptr),