summaryrefslogtreecommitdiff
path: root/toxav/toxmedia.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-02-04 23:08:34 +0100
committermannol <eniz_vukovic@hotmail.com>2014-02-16 19:11:55 -0500
commitfaaaa052065ad3ec283d8402d4acc0781cee9b50 (patch)
treed5fb5e3c2d513e27664318b7ae61ef204b413aae /toxav/toxmedia.c
parent0a910840112db3b56b987c0ba6b0cb0740e9a960 (diff)
Fixed audio bug and added reason when terminating call
Diffstat (limited to 'toxav/toxmedia.c')
-rw-r--r--toxav/toxmedia.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/toxav/toxmedia.c b/toxav/toxmedia.c
index 359832d3..00b1ebfc 100644
--- a/toxav/toxmedia.c
+++ b/toxav/toxmedia.c
@@ -345,8 +345,6 @@ int init_send_audio(codec_state *cs)
345 err = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_COMPLEXITY(10)); 345 err = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_COMPLEXITY(10));
346 err = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE)); 346 err = opus_encoder_ctl(cs->audio_encoder, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE));
347 347
348 opus_encoder_init(cs->audio_encoder, AUDIO_SAMPLE_RATE, 1, OPUS_APPLICATION_VOIP);
349
350 int nfo; 348 int nfo;
351 err = opus_encoder_ctl(cs->audio_encoder, OPUS_GET_LOOKAHEAD(&nfo)); 349 err = opus_encoder_ctl(cs->audio_encoder, OPUS_GET_LOOKAHEAD(&nfo));
352 /* printf("Encoder lookahead delay : %d\n", nfo); */ 350 /* printf("Encoder lookahead delay : %d\n", nfo); */
@@ -362,8 +360,7 @@ int init_encoder(codec_state *cs)
362 avdevice_register_all(); 360 avdevice_register_all();
363 av_register_all(); 361 av_register_all();
364 362
365 pthread_mutex_init(&cs->rtp_msg_mutex_lock, NULL); 363 pthread_mutex_init(&cs->ctrl_mutex, NULL);
366 pthread_mutex_init(&cs->avcodec_mutex_lock, NULL);
367 364
368 cs->support_send_video = init_send_video(cs); 365 cs->support_send_video = init_send_video(cs);
369 cs->support_send_audio = init_send_audio(cs); 366 cs->support_send_audio = init_send_audio(cs);