diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index e21dca3c8537f15c19edf59337afbd1104d3421b..aecd1fb914b9235a29fcbbd9af12d9f15987ad8b 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -959,7 +959,7 @@ VideoReceiver::_videoSinkProbe(GstPad* pad, GstPadProbeInfo* info, gpointer user void VideoReceiver::_noteVideoSinkFrame() { - _lastFrameTime = time(nullptr); + _lastFrameTime = QDateTime::currentSecsSinceEpoch(); } #endif @@ -1033,7 +1033,7 @@ VideoReceiver::_updateTimer() timeout = _videoSettings->rtspTimeout()->rawValue().toUInt(); } - const time_t now = time(nullptr); + const qint64 now = QDateTime::currentSecsSinceEpoch(); if(now - _lastFrameTime > timeout) { stop(); diff --git a/src/VideoStreaming/VideoReceiver.h b/src/VideoStreaming/VideoReceiver.h index b11bbcbb4c5e9840203e7f152dfae97093f46edb..f6acdbc8af68d83f931106b5091bb2ba4a0178a6 100644 --- a/src/VideoStreaming/VideoReceiver.h +++ b/src/VideoStreaming/VideoReceiver.h @@ -138,7 +138,7 @@ protected: GstElement* _pipelineStopRec; GstElement* _videoSink; guint64 _lastFrameId; - time_t _lastFrameTime; + qint64 _lastFrameTime; //-- Wait for Video Server to show up before starting QTimer _frameTimer;