Fixed memory leak during session cleanup and fixed naming.

This commit is contained in:
mannol 2015-08-07 02:04:04 +02:00
parent 7d5de68364
commit 657a57b406
5 changed files with 7 additions and 10 deletions

View File

@ -490,12 +490,12 @@ namespace video {
*
* @param friend_number The friend number of the friend for which to set the
* video bit rate.
* @param audio_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable
* @param video_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable
* video sending.
* @param force True if the bit rate change is forceful.
*
*/
bool set(uint32_t friend_number, uint32_t audio_bit_rate, bool force) with error for set_bit_rate;
bool set(uint32_t friend_number, uint32_t video_bit_rate, bool force) with error for set_bit_rate;
}
}
/*******************************************************************************

View File

@ -91,7 +91,6 @@ struct toxav_thread_data {
const char* vdout = "AV Test"; /* Video output */
PaStream* adout = NULL; /* Audio output */
typedef struct {
uint16_t size;
int16_t data[];
@ -118,7 +117,6 @@ void* pa_write_thread (void* d)
}
}
/**
* Callbacks
*/
@ -207,7 +205,6 @@ void t_accept_friend_request_cb(Tox *m, const uint8_t *public_key, const uint8_t
}
}
/**
*/
void initialize_tox(Tox** bootstrap, ToxAV** AliceAV, CallControl* AliceCC, ToxAV** BobAV, CallControl* BobCC)
@ -374,7 +371,6 @@ int send_opencv_img(ToxAV* av, uint32_t friend_number, const IplImage* img)
free(planes[2]);
return rc;
}
int print_audio_devices()
{
int i = 0;
@ -386,7 +382,6 @@ int print_audio_devices()
return 0;
}
int print_help (const char* name)
{
printf("Usage: %s -[a:v:o:dh]\n"

View File

@ -117,6 +117,7 @@ void ac_kill(ACSession* ac)
return;
opus_encoder_destroy(ac->encoder);
opus_encoder_destroy(ac->test_encoder);
opus_decoder_destroy(ac->decoder);
jbuf_free(ac->j_buf);

View File

@ -138,7 +138,7 @@ void rtp_kill ( RTPSession *session )
{
if ( !session ) return;
rtp_stop_receiving (session);
rtp_stop_receiving (session);
free ( session->ext_header );
free ( session->csrc );
@ -153,6 +153,7 @@ void rtp_kill ( RTPSession *session )
LOGGER_DEBUG("Terminated RTP session: %p", session);
/* And finally free session */
free ( session->rtcp_session );
free ( session );
}
int rtp_do(RTPSession *session)

View File

@ -510,12 +510,12 @@ void toxav_callback_video_bit_rate_status(ToxAV *toxAV, toxav_video_bit_rate_sta
*
* @param friend_number The friend number of the friend for which to set the
* video bit rate.
* @param audio_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable
* @param video_bit_rate The new video bit rate in Kb/sec. Set to 0 to disable
* video sending.
* @param force True if the bit rate change is forceful.
*
*/
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);
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);
/*******************************************************************************
*
* :: A/V sending