From cdee7030b413e25111106ac856cbb8ef4b2ea1b7 Mon Sep 17 00:00:00 2001 From: bossiel Date: Wed, 19 Jun 2013 19:12:33 +0000 Subject: [PATCH] fix issue 281 --- .../doubango/tinyDAV/src/audio/tdav_speex_jitterbuffer.c | 2 +- .../2.0/doubango/tinyDAV/src/codecs/g729/tdav_codec_g729.c | 2 +- branches/2.0/doubango/tinyDAV/src/tdav_session_av.c | 7 ++++--- branches/2.0/doubango/tinyDAV/src/video/jb/tdav_video_jb.c | 4 ++-- .../2.0/doubango/tinyDAV/src/video/tdav_session_video.c | 7 ++++--- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/branches/2.0/doubango/tinyDAV/src/audio/tdav_speex_jitterbuffer.c b/branches/2.0/doubango/tinyDAV/src/audio/tdav_speex_jitterbuffer.c index c8cd758f..c03a49e0 100644 --- a/branches/2.0/doubango/tinyDAV/src/audio/tdav_speex_jitterbuffer.c +++ b/branches/2.0/doubango/tinyDAV/src/audio/tdav_speex_jitterbuffer.c @@ -134,7 +134,7 @@ static int tdav_speex_jitterbuffer_put(tmedia_jitterbuffer_t* self, void* data, if(jb->buff.index >= jb->x_data_size){ tsk_size_t copied = 0; for(i = 0; (i + jb->x_data_size) <= jb->buff.index; i += jb->x_data_size){ - jb_packet.data = &jb->buff.ptr[i]; + jb_packet.data = (char*)&jb->buff.ptr[i]; jb_packet.timestamp = (++jb->fake_seqnum * jb_packet.span);// reassembled pkt will have fake seqnum jitter_buffer_put(jb->state, &jb_packet); copied += jb->x_data_size; diff --git a/branches/2.0/doubango/tinyDAV/src/codecs/g729/tdav_codec_g729.c b/branches/2.0/doubango/tinyDAV/src/codecs/g729/tdav_codec_g729.c index 2eb5c1c2..ee8f7308 100644 --- a/branches/2.0/doubango/tinyDAV/src/codecs/g729/tdav_codec_g729.c +++ b/branches/2.0/doubango/tinyDAV/src/codecs/g729/tdav_codec_g729.c @@ -93,7 +93,7 @@ static int tdav_codec_g729ab_close(tmedia_codec_t* self) { tdav_codec_g729ab_t* g729a = (tdav_codec_g729ab_t*)self; - (g729a); + (void)(g729a); /* resources will be freed by the dctor() */ diff --git a/branches/2.0/doubango/tinyDAV/src/tdav_session_av.c b/branches/2.0/doubango/tinyDAV/src/tdav_session_av.c index d70e69a5..f09627ff 100644 --- a/branches/2.0/doubango/tinyDAV/src/tdav_session_av.c +++ b/branches/2.0/doubango/tinyDAV/src/tdav_session_av.c @@ -46,6 +46,7 @@ #include /* log10 */ #include /* INT_MAX */ +#include /* isspace */ #if HAVE_SRTP @@ -1191,7 +1192,7 @@ int tdav_session_av_set_ro(tdav_session_av_t* self, const struct tsdp_header_M_s // check if the RTP profile from remote party is supported or not if((profile_remote = _sdp_profile_from_string(m->proto)) == RTP_PROFILE_NONE){ - TSK_DEBUG_ERROR("%s not supported as RTP profile"); + TSK_DEBUG_ERROR("%s not supported as RTP profile", m->proto); return -2; } // check that all options in the profile are supported @@ -1844,7 +1845,7 @@ static int _sdp_acaps_from_sdp(const sdp_headerM_Or_Message* sdp, sdp_acap_xt (* break; } if(tag <= 0 || (tag + 1) > SDP_CAPS_COUNT_MAX){ - TSK_DEBUG_WARN("Ignoring tag with value = %d"); + TSK_DEBUG_WARN("Ignoring tag with value = %d", tag); goto next; } @@ -2018,7 +2019,7 @@ static int _sdp_pcfgs_from_sdp(const sdp_headerM_Or_Message* sdp, sdp_acap_xt (* break; } if(tag <= 0 || (tag + 1) > SDP_CAPS_COUNT_MAX){ - TSK_DEBUG_WARN("Ignoring tag with value = %d"); + TSK_DEBUG_WARN("Ignoring tag with value = %d", tag); goto next_A; } diff --git a/branches/2.0/doubango/tinyDAV/src/video/jb/tdav_video_jb.c b/branches/2.0/doubango/tinyDAV/src/video/jb/tdav_video_jb.c index ed916599..33346cdb 100644 --- a/branches/2.0/doubango/tinyDAV/src/video/jb/tdav_video_jb.c +++ b/branches/2.0/doubango/tinyDAV/src/video/jb/tdav_video_jb.c @@ -413,8 +413,8 @@ static void* TSK_STDCALL _tdav_video_jb_decode_thread_func(void *arg) jb->decode_last_seq_num_with_mark = -1; // -1 -> unset jb->decode_last_time = tsk_time_now(); - (now); - (delay); + (void)(now); + (void)(delay); TSK_DEBUG_INFO("Video jitter buffer thread - ENTER"); diff --git a/branches/2.0/doubango/tinyDAV/src/video/tdav_session_video.c b/branches/2.0/doubango/tinyDAV/src/video/tdav_session_video.c index fdc0867b..2ac42ef9 100644 --- a/branches/2.0/doubango/tinyDAV/src/video/tdav_session_video.c +++ b/branches/2.0/doubango/tinyDAV/src/video/tdav_session_video.c @@ -860,10 +860,11 @@ static int _tdav_session_video_decode(tdav_session_video_t* self, const trtp_rtp // congetion control // send RTCP-REMB if: - // - fps changed - // - first frame + // - congestion control is enabled and + // - fps changed or + // - first frame or // - approximately every 5 minutes (300 = 60 * 5) - if(self->fps_changed && base->congestion_ctrl_enabled && base->rtp_manager && (self->decoder.codec_decoded_frames_count == 0 || ((self->decoder.codec_decoded_frames_count % (TMEDIA_CODEC_VIDEO(self->decoder.codec)->in.fps * 300)) == 0))){ + if(base->congestion_ctrl_enabled && base->rtp_manager && (self->fps_changed || self->decoder.codec_decoded_frames_count == 0 || ((self->decoder.codec_decoded_frames_count % (TMEDIA_CODEC_VIDEO(self->decoder.codec)->in.fps * 300)) == 0))){ int32_t bandwidth_max_upload_kbps = base->bandwidth_max_upload_kbps; int32_t bandwidth_max_download_kbps = base->bandwidth_max_download_kbps; // bandwidth already computed in start() be the decoded video size was not correct and based on the SDP negotiation