Make FakeDecodeFromFile handle codec-internal CNG
This implementation interprets payloads of size 1 as codec-internal SID frames, marking the start of a CNG period. Changes were made to other parts of the test payload chain, since it had to make use of the virtual payload size in the case of header-only RTP files. BUG=webrtc:2692 Review-Url: https://codereview.webrtc.org/2275903002 Cr-Commit-Position: refs/heads/master@{#13901}
This commit is contained in:
committed by
Commit bot
parent
f02207dde9
commit
d1a10a0f77
@ -14,6 +14,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/modules/include/module_common_types.h"
|
||||
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
|
||||
|
||||
@ -142,6 +143,7 @@ bool Packet::ParseHeader(const RtpHeaderParser& parser) {
|
||||
payload_ = &payload_memory_[header_.headerLength];
|
||||
assert(packet_length_bytes_ >= header_.headerLength);
|
||||
payload_length_bytes_ = packet_length_bytes_ - header_.headerLength;
|
||||
RTC_CHECK_GE(virtual_packet_length_bytes_, packet_length_bytes_);
|
||||
assert(virtual_packet_length_bytes_ >= header_.headerLength);
|
||||
virtual_payload_length_bytes_ =
|
||||
virtual_packet_length_bytes_ - header_.headerLength;
|
||||
|
||||
Reference in New Issue
Block a user