Merge pull request #798 from mannol1/master

Fixed segfault, timeout handling and logging.
This commit is contained in:
irungentoo 2014-03-11 19:51:58 -04:00
commit 500528a93f
3 changed files with 10 additions and 10 deletions

View File

@ -197,7 +197,7 @@ int init_video_decoder(CodecState *cs)
{
if (vpx_codec_dec_init_ver(&cs->v_decoder, VIDEO_CODEC_DECODER_INTERFACE, NULL, 0,
VPX_DECODER_ABI_VERSION) != VPX_CODEC_OK) {
fprintf(stderr, "Init video_decoder failed!\n");
/*fprintf(stderr, "Init video_decoder failed!\n");*/
return -1;
}
@ -210,7 +210,7 @@ int init_audio_decoder(CodecState *cs, uint32_t audio_channels)
cs->audio_decoder = opus_decoder_create(cs->audio_sample_rate, audio_channels, &rc );
if ( rc != OPUS_OK ) {
fprintf(stderr, "Error while starting audio decoder!\n");
/*fprintf(stderr, "Error while starting audio decoder!\n");*/
return -1;
}
@ -224,7 +224,7 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
int res = vpx_codec_enc_config_default(VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0);
if (res) {
fprintf(stderr, "Failed to get config: %s\n", vpx_codec_err_to_string(res));
/*fprintf(stderr, "Failed to get config: %s\n", vpx_codec_err_to_string(res));*/
return -1;
}
@ -234,7 +234,7 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
if (vpx_codec_enc_init_ver(&cs->v_encoder, VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0,
VPX_ENCODER_ABI_VERSION) != VPX_CODEC_OK) {
fprintf(stderr, "Failed to initialize encoder\n");
/*fprintf(stderr, "Failed to initialize encoder\n");*/
return -1;
}

View File

@ -730,6 +730,9 @@ void *handle_timeout ( void *arg )
/* Send hangup either way */
MSISession *_session = arg;
invoke_callback(MSI_OnRequestTimeout);
invoke_callback(MSI_OnEnding);
if ( _session && _session->call ) {
uint32_t *_peers = _session->call->peers;
@ -744,9 +747,6 @@ void *handle_timeout ( void *arg )
}
if ( callbacks[MSI_OnRequestTimeout].function ) callbacks[MSI_OnRequestTimeout].function ( callbacks[MSI_OnRequestTimeout].data );
if ( callbacks[MSI_OnEnding].function ) callbacks[MSI_OnEnding ].function ( callbacks[MSI_OnEnding].data );
return NULL;
}

View File

@ -751,7 +751,7 @@ int rtp_send_msg ( RTPSession *session, Messenger *messenger, const uint8_t *dat
/*if ( full_length != sendpacket ( messenger->net, *((IP_Port*) &session->dest), _send_data, full_length) ) {*/
if ( full_length != send_custom_user_packet(messenger, session->dest, _send_data, full_length) ) {
fprintf(stderr, "Rtp error: %s\n", strerror(errno));
/*fprintf(stderr, "Rtp error: %s\n", strerror(errno));*/
return -1;
}
@ -823,7 +823,7 @@ RTPSession *rtp_init_session ( int payload_type,
/*networking_registerhandler(messenger->net, payload_type, rtp_handle_packet, _retu);*/
if ( -1 == custom_user_packet_registerhandler(messenger, friend_num, payload_type, rtp_handle_packet, _retu) ) {
fprintf(stderr, "Error setting custom register handler for rtp session\n");
/*fprintf(stderr, "Error setting custom register handler for rtp session\n");*/
free(_retu);
return NULL;
}