mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
Improve STOP command in the buffering mode
Signed-off-by: max_10 <max_10@gmx.de>
This commit is contained in:
@@ -638,7 +638,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", 44);
|
||||
fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 45);
|
||||
if (0 != ParseParams(argc, argv, file, audioFile, &audioTrackIdx, &subtitleTrackIdx, &linuxDvbBufferSizeMB))
|
||||
{
|
||||
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");
|
||||
|
@@ -294,6 +294,8 @@ int32_t LinuxDvbBuffClose(Context_t *context __attribute__((unused)))
|
||||
WriteWakeUp();
|
||||
|
||||
pthread_mutex_lock(&bufferingMtx);
|
||||
/* wake up if thread is waiting for data */
|
||||
pthread_cond_signal(&bufferingdDataAddedCond);
|
||||
/* wait for thread end */
|
||||
clock_gettime(CLOCK_REALTIME, &max_wait);
|
||||
max_wait.tv_sec += 1;
|
||||
|
@@ -198,6 +198,8 @@ int LinuxDvbClose(Context_t *context, char *type)
|
||||
*/
|
||||
LinuxDvbStop(context, type);
|
||||
getLinuxDVBMutex(FILENAME, __FUNCTION__, __LINE__);
|
||||
if (isBufferedOutput)
|
||||
LinuxDvbBuffClose(context);
|
||||
if (video && videofd != -1)
|
||||
{
|
||||
close(videofd);
|
||||
@@ -208,8 +210,6 @@ int LinuxDvbClose(Context_t *context, char *type)
|
||||
close(audiofd);
|
||||
audiofd = -1;
|
||||
}
|
||||
if (isBufferedOutput)
|
||||
LinuxDvbBuffClose(context);
|
||||
releaseLinuxDVBMutex(FILENAME, __FUNCTION__, __LINE__);
|
||||
return cERR_LINUXDVB_NO_ERROR;
|
||||
}
|
||||
|
Reference in New Issue
Block a user