armbox eplayer: fix init jump

This commit is contained in:
TangoCash
2018-01-10 20:04:51 +01:00
committed by Thilo Graf
parent c8a4716085
commit 3e166e6123
2 changed files with 5 additions and 2 deletions

View File

@@ -206,6 +206,7 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, in
}
}
playing = true;
first = true;
player->output->Command(player, OUTPUT_OPEN, NULL);
ret = (player->playback->Command(player, PLAYBACK_PLAY, NULL) == 0);
if (ret && !isHTTP)
@@ -424,7 +425,7 @@ bool cPlayback::GetPosition(int &position, int &duration)
bool cPlayback::SetPosition(int position, bool absolute)
{
lt_info("%s %d\n", __func__, position);
if (!playing)
if (playing && first)
{
/* the calling sequence is:
* Start() - paused
@@ -433,6 +434,7 @@ bool cPlayback::SetPosition(int position, bool absolute)
* so let's remember the initial jump position and later jump to it
*/
init_jump = position;
first = false;
return false;
}
int64_t pos = (position / 1000.0);
@@ -682,6 +684,7 @@ cPlayback::cPlayback(int num __attribute__((unused)))
lt_info("%s\n", __func__);
playing = false;
decoders_closed = false;
first = false;
}
cPlayback::~cPlayback()

View File

@@ -18,7 +18,7 @@ class cPlayback
private:
bool enabled;
bool playing;
bool playing, first;
bool no_probe;
int nPlaybackSpeed;
int mAudioStream;