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 28c83ed0..4540fcf3 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 @@ -471,7 +471,7 @@ static void* TSK_STDCALL _tdav_video_jb_decode_thread_func(void *arg) TSK_DEBUG_INFO("Time to decode frame...but some RTP packets are missing (missing_seq_num_start=%d, missing_seq_num_count=%d, last_seq_num_with_mark=%d). Postpone :(", missing_seq_num_start, missing_seq_num_count, jb->decode_last_seq_num_with_mark); // signal to the session that a sequence number is missing (will send a NACK) // the missing seqnum has been already requested in jb_put() and here we request it again only ONE time - if (jb->callback) { + if (jb->callback && frame) { if(prev_missing_seq_num_start != missing_seq_num_start || prev_lasted_missing_seq_num_count != missing_seq_num_count){ // guard to request it only once jb->cb_data_any.type = tdav_video_jb_cb_data_type_fl; jb->cb_data_any.ssrc = frame->ssrc; diff --git a/branches/2.0/doubango/tinyRTP/src/trtp_manager.c b/branches/2.0/doubango/tinyRTP/src/trtp_manager.c index 756029ca..48d72819 100644 --- a/branches/2.0/doubango/tinyRTP/src/trtp_manager.c +++ b/branches/2.0/doubango/tinyRTP/src/trtp_manager.c @@ -425,8 +425,15 @@ static int _trtp_manager_recv_data(const trtp_manager_t* self, const uint8_t* da if(self->srtp_ctx_neg_remote){ srtp_t session = self->srtp_ctx_neg_remote->rtcp.initialized ? self->srtp_ctx_neg_remote->rtcp.session : self->srtp_ctx_neg_remote->rtp.session; if((status = srtp_unprotect_rtcp(session, (void*)data_ptr, (int*)&data_size)) != err_status_ok){ - TSK_DEBUG_ERROR("srtp_unprotect(RTCP) failed with error code=%d", (int)status); - return -1; + if (status == err_status_replay_fail) { + // replay (because of RTCP-NACK nothing to worry about) + TSK_DEBUG_INFO("srtp_unprotect(RTCP) returned 'err_status_replay_fail'"); + return 0; + } + else { + TSK_DEBUG_ERROR("srtp_unprotect(RTCP) failed with error code=%d", (int)status); + return -1; + } } } #endif