mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Fix a fuzzer-found issue in G.722 decoder
Bug: chromium:1521407 Change-Id: I913108232f195856a9e2693dc1350ec0937fa923 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337182 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41647}
This commit is contained in:
parent
26ad5b82ce
commit
1d3e286c7f
2 changed files with 7 additions and 0 deletions
|
@ -63,6 +63,11 @@ int AudioDecoderG722Impl::PacketDuration(const uint8_t* encoded,
|
|||
return static_cast<int>(2 * encoded_len / Channels());
|
||||
}
|
||||
|
||||
int AudioDecoderG722Impl::PacketDurationRedundant(const uint8_t* encoded,
|
||||
size_t encoded_len) const {
|
||||
return PacketDuration(encoded, encoded_len);
|
||||
}
|
||||
|
||||
int AudioDecoderG722Impl::SampleRateHz() const {
|
||||
return 16000;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ class AudioDecoderG722Impl final : public AudioDecoder {
|
|||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||
uint32_t timestamp) 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;
|
||||
size_t Channels() const override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue