|
|
@@ -1151,9 +1151,10 @@ void* recv_proc(void* arg)
|
|
|
#endif
|
|
|
{
|
|
|
videortp_t *vrtp = (videortp_t*)arg;
|
|
|
+ int ifresh_time = vrtp->config.fresh_time;
|
|
|
int rtp_timeout_cnt = 0;
|
|
|
int64_t pre_500_ms = TimeInMilliseconds();
|
|
|
- rtpDbg(vrtp,"enter recv_proc.");
|
|
|
+ rtpDbg(vrtp,"enter recv_proc,and ifresh time is %dms.", ifresh_time);
|
|
|
#ifdef _WIN32
|
|
|
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
|
|
|
#else
|
|
|
@@ -1172,11 +1173,9 @@ void* recv_proc(void* arg)
|
|
|
struct timespec ts;
|
|
|
//int ivalue = -1;
|
|
|
clock_gettime(CLOCK_REALTIME, &ts);
|
|
|
- long unsec = ts.tv_nsec + (1000 * 1000 * 100);
|
|
|
+ long unsec = ts.tv_nsec + (1000 * 1000 * ifresh_time);
|
|
|
ts.tv_sec += (unsec / 1000000000);
|
|
|
ts.tv_nsec = (unsec % 1000000000);
|
|
|
- //sem_getvalue(&vrtp->sem_evt, &ivalue);
|
|
|
- //rtpDbg(vrtp,"%s:%d sem value is %d", __FUNCTION__, __LINE__, ivalue);
|
|
|
if (0 != sem_timedwait(&vrtp->sem_evt, &ts) && (ETIMEDOUT == errno))
|
|
|
#endif
|
|
|
{
|