libspark: allow streams to play for more than 10 seconds

Neutrino determines "end of file" amongst others by checking if
the current position is less than one second before file length.
So for the streaming case, alwas pretend to be two seconds behind.
This commit is contained in:
Stefan Seyfried
2016-01-08 17:29:56 +01:00
parent 23c64535be
commit 238f2636d6

View File

@@ -329,7 +329,7 @@ bool cPlayback::GetPosition(int &position, int &duration)
player->GetDuration(length); player->GetDuration(length);
if(length <= 0) if(length <= 0)
duration = position + AV_TIME_BASE / 1000; duration = position + 2 * AV_TIME_BASE / 1000;
else else
duration = length * 1000 / AV_TIME_BASE; duration = length * 1000 / AV_TIME_BASE;