diff options
author | mannol <eniz_vukovic@hotmail.com> | 2015-08-07 02:04:04 +0200 |
---|---|---|
committer | mannol <eniz_vukovic@hotmail.com> | 2015-08-07 02:04:04 +0200 |
commit | 657a57b406717a3ff08233eef14f20818c137f47 (patch) | |
tree | ac0bcda6a036825796d29ef4b5538045233bd082 /toxav | |
parent | 7d5de68364f83662a19e45e6e3ab021414178df5 (diff) |
Fixed memory leak during session cleanup and fixed naming.
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/audio.c | 1 | ||||
-rw-r--r-- | toxav/rtp.c | 3 | ||||
-rw-r--r-- | toxav/toxav.h | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/toxav/audio.c b/toxav/audio.c index 0a6f04e3..afb9f26c 100644 --- a/toxav/audio.c +++ b/toxav/audio.c | |||
@@ -117,6 +117,7 @@ void ac_kill(ACSession* ac) | |||
117 | return; | 117 | return; |
118 | 118 | ||
119 | opus_encoder_destroy(ac->encoder); | 119 | opus_encoder_destroy(ac->encoder); |
120 | opus_encoder_destroy(ac->test_encoder); | ||
120 | opus_decoder_destroy(ac->decoder); | 121 | opus_decoder_destroy(ac->decoder); |
121 | jbuf_free(ac->j_buf); | 122 | jbuf_free(ac->j_buf); |
122 | 123 | ||
diff --git a/toxav/rtp.c b/toxav/rtp.c index 148c4238..7a20877f 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -138,7 +138,7 @@ void rtp_kill ( RTPSession *session ) | |||
138 | { | 138 | { |
139 | if ( !session ) return; | 139 | if ( !session ) return; |
140 | 140 | ||
141 | rtp_stop_receiving (session); | 141 | rtp_stop_receiving (session); |
142 | 142 | ||
143 | free ( session->ext_header ); | 143 | free ( session->ext_header ); |
144 | free ( session->csrc ); | 144 | free ( session->csrc ); |
@@ -153,6 +153,7 @@ void rtp_kill ( RTPSession *session ) | |||
153 | LOGGER_DEBUG("Terminated RTP session: %p", session); | 153 | LOGGER_DEBUG("Terminated RTP session: %p", session); |
154 | 154 | ||
155 | /* And finally free session */ | 155 | /* And finally free session */ |
156 | free ( session->rtcp_session ); | ||
156 | free ( session ); | 157 | free ( session ); |
157 | } | 158 | } |
158 | int rtp_do(RTPSession *session) | 159 | int rtp_do(RTPSession *session) |
diff --git a/toxav/toxav.h b/toxav/toxav.h index 3c745b36..58d5503f 100644 --- a/toxav/toxav.h +++ b/toxav/toxav.h | |||
@@ -510,12 +510,12 @@ void toxav_callback_video_bit_rate_status(ToxAV *toxAV, toxav_video_bit_rate_sta | |||
510 | * | 510 | * |
511 | * @param friend_number The friend number of the friend for which to set the | 511 | * @param friend_number The friend number of the friend for which to set the |
512 | * video bit rate. | 512 | * video bit rate. |
513 | * @param audio_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable | 513 | * @param video_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable |
514 | * video sending. | 514 | * video sending. |
515 | * @param force True if the bit rate change is forceful. | 515 | * @param force True if the bit rate change is forceful. |
516 | * | 516 | * |
517 | */ | 517 | */ |
518 | bool toxav_video_bit_rate_set(ToxAV *toxAV, uint32_t friend_number, uint32_t audio_bit_rate, bool force, TOXAV_ERR_SET_BIT_RATE *error); | 518 | bool toxav_video_bit_rate_set(ToxAV *toxAV, uint32_t friend_number, uint32_t video_bit_rate, bool force, TOXAV_ERR_SET_BIT_RATE *error); |
519 | /******************************************************************************* | 519 | /******************************************************************************* |
520 | * | 520 | * |
521 | * :: A/V sending | 521 | * :: A/V sending |