Fix a fuzzer-found issue in PCM16 decoder
Bug: chromium:1521761 Change-Id: Id5292e80fd6ecae2c39a446dec010b0383bd805e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337200 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41645}
This commit is contained in:
parent
14b016fbf9
commit
9b7f3649af
@ -67,4 +67,9 @@ int AudioDecoderPcm16B::PacketDuration(const uint8_t* encoded,
|
|||||||
return static_cast<int>(encoded_len / (2 * Channels()));
|
return static_cast<int>(encoded_len / (2 * Channels()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int AudioDecoderPcm16B::PacketDurationRedundant(const uint8_t* encoded,
|
||||||
|
size_t encoded_len) const {
|
||||||
|
return PacketDuration(encoded, encoded_len);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -32,6 +32,8 @@ class AudioDecoderPcm16B final : public AudioDecoder {
|
|||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
|
int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
|
||||||
|
int PacketDurationRedundant(const uint8_t* encoded,
|
||||||
|
size_t encoded_len) const override;
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t Channels() const override;
|
size_t Channels() const override;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user