diff options
-rw-r--r-- | toxav/codec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/toxav/codec.c b/toxav/codec.c index 7b76929c..9f705db4 100644 --- a/toxav/codec.c +++ b/toxav/codec.c | |||
@@ -315,6 +315,14 @@ static int init_audio_encoder(CSSession *cs) | |||
315 | return -1; | 315 | return -1; |
316 | } | 316 | } |
317 | 317 | ||
318 | /* Make codec resistant to up to 10% packet loss */ | ||
319 | rc = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_PACKET_LOSS_PERC(10)); | ||
320 | |||
321 | if ( rc != OPUS_OK ) { | ||
322 | LOGGER_ERROR("Error while setting encoder ctl: %s", opus_strerror(rc)); | ||
323 | return -1; | ||
324 | } | ||
325 | |||
318 | rc = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_COMPLEXITY(10)); | 326 | rc = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_COMPLEXITY(10)); |
319 | 327 | ||
320 | if ( rc != OPUS_OK ) { | 328 | if ( rc != OPUS_OK ) { |