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:

committed by
Commit Bot

parent
74fb822b67
commit
ee59a17bbb
@ -99,8 +99,15 @@ bool RtpGenericFrameDescriptor::AddFrameDependencyDiff(uint16_t fdiff) {
|
|||||||
|
|
||||||
void RtpGenericFrameDescriptor::SetByteRepresentation(
|
void RtpGenericFrameDescriptor::SetByteRepresentation(
|
||||||
rtc::ArrayView<const uint8_t> byte_representation) {
|
rtc::ArrayView<const uint8_t> byte_representation) {
|
||||||
|
RTC_CHECK(!byte_representation.empty());
|
||||||
byte_representation_.assign(byte_representation.begin(),
|
byte_representation_.assign(byte_representation.begin(),
|
||||||
byte_representation.end());
|
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>
|
rtc::ArrayView<const uint8_t>
|
||||||
|
Reference in New Issue
Block a user