Update max download/upload bandwidth only if congestion control is enabled

This commit is contained in:
bossiel 2013-06-19 18:46:48 +00:00
parent 8f25b4d354
commit 6d20f4b9d2
1 changed files with 1 additions and 1 deletions

View File

@ -863,7 +863,7 @@ static int _tdav_session_video_decode(tdav_session_video_t* self, const trtp_rtp
// - fps changed
// - first frame
// - 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(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))){
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