Index: webrtc/modules/audio_coding/codecs/opus/opus_interface.c |
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c |
index 41e17ae51058e7c9e8e4a67ecd4f3beaa4a133d3..5bb3472b5a899fe3d0d2aa7b3ebbc2578b5242b8 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c |
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c |
@@ -283,7 +283,11 @@ static int16_t DetermineAudioType(OpusDecInst* inst, size_t encoded_bytes) { |
// to be so if the following |encoded_byte| are 0 or 1. |
if (encoded_bytes == 0 && inst->in_dtx_mode) { |
return 2; // Comfort noise. |
- } else if (encoded_bytes == 1) { |
+ } else if (encoded_bytes == 1 || encoded_bytes == 2) { |
+ // TODO(henrik.lundin): There is a slight risk that a 2-byte payload is in |
+ // fact a 1-byte TOC with a 1-byte payload. That will be erroneously |
+ // interpreted as comfort noise output, but such a payload is probably |
+ // faulty anyway. |
inst->in_dtx_mode = 1; |
return 2; // Comfort noise. |
} else { |