Ensure GenericFrameDescriptor byte representation match

on receiver and on sender

Bug: webrtc:9795
Change-Id: I13dfcc6dce0be55d90406e27ba855ef5e786af24
Reviewed-on: https://webrtc-review.googlesource.com/c/104900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25889}
This commit is contained in:
Danil Chapovalov
2018-12-04 10:31:29 +01:00
committed by Commit Bot
parent 74fb822b67
commit ee59a17bbb

View File

@ -99,8 +99,15 @@ bool RtpGenericFrameDescriptor::AddFrameDependencyDiff(uint16_t fdiff) {
void RtpGenericFrameDescriptor::SetByteRepresentation(
rtc::ArrayView<const uint8_t> byte_representation) {
RTC_CHECK(!byte_representation.empty());
byte_representation_.assign(byte_representation.begin(),
byte_representation.end());
// Clear end_of_subframe bit.
// Because ByteRepresentation is used for frame authentication, bit describing
// position of the packet in the frame shouldn't be part of it.
// This match RtpVideoSender where descriptor is passed for authentication
// before end_of_subframe bit is decided and set, i.e. it is always 0.
byte_representation_[0] &= ~0x40;
}
rtc::ArrayView<const uint8_t>