Do not wait in the FFMPEG thread.

Signed-off-by: max_10 <max_10@gmx.de>


Origin commit data
------------------
Branch: master
Commit: da5077caa2
Author: samsamsam <samsamsam@o2.pl>
Date: 2018-03-30 (Fri, 30 Mar 2018)



------------------
This commit was generated by Migit
This commit is contained in:
samsamsam
2018-03-30 14:29:35 +02:00
committed by max_10
parent 161ba28427
commit 0824b330fb
4 changed files with 38 additions and 11 deletions

View File

@@ -635,7 +635,7 @@ int main(int argc, char *argv[])
memset(argvBuff, '\0', sizeof(argvBuff));
int commandRetVal = -1;
/* inform client that we can handle additional commands */
fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 39);
fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 40);
if (0 != ParseParams(argc, argv, file, audioFile, &audioTrackIdx, &subtitleTrackIdx))
{
printf("Usage: exteplayer3 filePath [-u user-agent] [-c cookies] [-h headers] [-p prio] [-a] [-d] [-w] [-l] [-s] [-i] [-t audioTrackId] [-9 subtitleTrackId] [-x separateAudioUri] plabackUri\n");
@@ -922,7 +922,21 @@ int main(int argc, char *argv[])
commandRetVal = g_player->playback->Command(g_player, PLAYBACK_PTS, &pts);
if (0 == commandRetVal)
{
fprintf(stderr, "{\"J\":{\"ms\":%lld}}\n", pts / 90);
int64_t lastPts = 0;
commandRetVal = 1;
if (g_player->container && g_player->container->selectedContainer)
{
commandRetVal = g_player->container->selectedContainer->Command((Context_t*)g_player->container, CONTAINER_LAST_PTS, &lastPts);
}
if (0 == commandRetVal && lastPts != INVALID_PTS_VALUE)
{
fprintf(stderr, "{\"J\":{\"ms\":%lld,\"lms\":%lld}}\n", pts / 90, lastPts / 90);
}
else
{
fprintf(stderr, "{\"J\":{\"ms\":%lld}}\n", pts / 90);
}
}
break;
}