// we have to wait untile the next frame
long long offset=Demuxer::getInstance()->getFrameRate();
if (offset==0) offset=25;
- offset=10000000LL/offset;
+ offset=-2*10000000LL/offset;
target_time+=offset;
long long current_time=GetCurrentSystemTime();
if (!skipping) {
- if ((target_time-current_time)<-1000000LL) {
+ if ((target_time-current_time)<-400000LL) {
skip=true; // we are too slow
skipping=true;
/* Log::getInstance()->log("Video", Log::DEBUG,
skipping=false;
}
} else {
- if ((target_time - current_time) < 0LL) {
+ if ((target_time - current_time) < 0000LL) { //skip a bit more
skip = true; // we are too slow
skipping = true;
/* Log::getInstance()->log("Video", Log::DEBUG,"Skipping frames2 %lld %lld",target_time-current_time,pts);
long long offset=Demuxer::getInstance()->getFrameRate();
long long current_time=GetCurrentSystemTime();
if (offset==0) offset=25;
- offset=10000000LL/offset;
+ offset=-2*10000000LL/offset;
target_time+=offset;
if ((target_time-current_time)>1000000LL) target_time=current_time+1000000LL; // something is wrong do not wait too long
//Log::getInstance()->log("Video", Log::DEBUG, "Wait for display pts: %lld target: %lld sys: %lld off: %lld diff %lld",pts,target_time,current_time,offset,