From d354d56b8401908aa14eb3dc1411974b3e2f2b08 Mon Sep 17 00:00:00 2001 From: Karl Wiberg Date: Wed, 26 Aug 2020 15:02:58 +0200 Subject: [PATCH] Audio codec factories: Implementations return null on unsupported formats Bug: none Change-Id: I2db106b00b108b7f1682082bb1d58ef7a48569f9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182682 Reviewed-by: Alejandro Luebs Commit-Queue: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#32002} --- api/audio_codecs/audio_decoder_factory.h | 2 ++ api/audio_codecs/audio_encoder_factory.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/audio_codecs/audio_decoder_factory.h b/api/audio_codecs/audio_decoder_factory.h index c36a0e103b..2811f6704b 100644 --- a/api/audio_codecs/audio_decoder_factory.h +++ b/api/audio_codecs/audio_decoder_factory.h @@ -38,6 +38,8 @@ class AudioDecoderFactory : public rtc::RefCountInterface { // communication between the AudioEncoder and AudioDecoder instances, which is // needed for some codecs with built-in bandwidth adaptation.) // + // Returns null if the format isn't supported. + // // Note: Implementations need to be robust against combinations other than // one encoder, one decoder getting the same ID; such decoders must still // work. diff --git a/api/audio_codecs/audio_encoder_factory.h b/api/audio_codecs/audio_encoder_factory.h index 48995a876d..6128b1b6f3 100644 --- a/api/audio_codecs/audio_encoder_factory.h +++ b/api/audio_codecs/audio_encoder_factory.h @@ -44,6 +44,8 @@ class AudioEncoderFactory : public rtc::RefCountInterface { // communication between the AudioEncoder and AudioDecoder instances, which is // needed for some codecs with built-in bandwidth adaptation.) // + // Returns null if the format isn't supported. + // // Note: Implementations need to be robust against combinations other than // one encoder, one decoder getting the same ID; such encoders must still // work.