From 8e8c8108fc6f4e8e09179c32e4f88488d7a3a116 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 9 Jun 2015 21:04:30 +0800 Subject: [PATCH] refine the time jitter code. --- trunk/src/app/srs_app_source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index caea50ec8..b30bf9c3f 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -92,7 +92,7 @@ int SrsRtmpJitter::correct(SrsSharedPtrMessage* msg, int tba, int tbv, SrsRtmpJi if (ag == SrsRtmpJitterAlgorithmZERO) { // for the first time, last_pkt_correct_time is zero. // while when timestamp overflow, the timestamp become smaller, reset the last_pkt_correct_time. - if (last_pkt_correct_time <= 0 || last_pkt_correct_time > msg->timestamp) { + if (last_pkt_correct_time <= 0 || msg->timestamp < last_pkt_correct_time) { last_pkt_correct_time = msg->timestamp; } msg->timestamp -= last_pkt_correct_time;