diff --git a/src/engines/gstengine.cpp b/src/engines/gstengine.cpp index 47bcf09a8..9cff981af 100644 --- a/src/engines/gstengine.cpp +++ b/src/engines/gstengine.cpp @@ -616,7 +616,10 @@ void GstEngine::timerEvent(QTimerEvent* e) { const qint64 remaining = current_length - current_position; const qint64 fudge = kTimerIntervalNanosec + 100 * kNsecPerMsec; // Mmm fudge - const qint64 gap = autocrossfade_enabled_ ? fadeout_duration_nanosec_ : kPreloadGapNanosec; + const qint64 gap = buffer_duration_nanosec_ + ( + autocrossfade_enabled_ ? + fadeout_duration_nanosec_ : + kPreloadGapNanosec); // only if we know the length of the current stream... if(current_length > 0) { diff --git a/src/engines/gstengine.h b/src/engines/gstengine.h index 6f04e6515..c0686dbdb 100644 --- a/src/engines/gstengine.h +++ b/src/engines/gstengine.h @@ -158,9 +158,9 @@ class GstEngine : public Engine::Base, public BufferConsumer { static QUrl FixupUrl(const QUrl& url); private: - static const int kTimerIntervalNanosec = 1000 * kNsecPerMsec; // 1s - static const int kPreloadGapNanosec = 1000 * kNsecPerMsec; // 1s - static const int kSeekDelayNanosec = 100 * kNsecPerMsec; // 100msec + static const qint64 kTimerIntervalNanosec = 1000 * kNsecPerMsec; // 1s + static const qint64 kPreloadGapNanosec = 1000 * kNsecPerMsec; // 1s + static const qint64 kSeekDelayNanosec = 100 * kNsecPerMsec; // 100msec static const char* kHypnotoadPipeline; static const char* kEnterprisePipeline;