mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
@@ -575,6 +575,7 @@ static int ParseParams(int argc, char *argv[], PlayFiles_t *playbackFiles, int *
|
|||||||
if (optarg[0] != '\0')
|
if (optarg[0] != '\0')
|
||||||
{
|
{
|
||||||
playbackFiles->szSecondFile = malloc(IPTV_MAX_FILE_PATH);
|
playbackFiles->szSecondFile = malloc(IPTV_MAX_FILE_PATH);
|
||||||
|
playbackFiles->szSecondFile[0] = '\0';
|
||||||
strncpy(playbackFiles->szSecondFile, optarg, IPTV_MAX_FILE_PATH - 1);
|
strncpy(playbackFiles->szSecondFile, optarg, IPTV_MAX_FILE_PATH - 1);
|
||||||
playbackFiles->szSecondFile[IPTV_MAX_FILE_PATH] = '\0';
|
playbackFiles->szSecondFile[IPTV_MAX_FILE_PATH] = '\0';
|
||||||
map_inter_file_path(playbackFiles->szSecondFile);
|
map_inter_file_path(playbackFiles->szSecondFile);
|
||||||
@@ -639,6 +640,7 @@ static int ParseParams(int argc, char *argv[], PlayFiles_t *playbackFiles, int *
|
|||||||
if (optarg[0] != '\0')
|
if (optarg[0] != '\0')
|
||||||
{
|
{
|
||||||
playbackFiles->szFirstMoovAtomFile = malloc(IPTV_MAX_FILE_PATH);
|
playbackFiles->szFirstMoovAtomFile = malloc(IPTV_MAX_FILE_PATH);
|
||||||
|
playbackFiles->szFirstMoovAtomFile[0] = '\0';
|
||||||
strncpy(playbackFiles->szFirstMoovAtomFile, optarg, IPTV_MAX_FILE_PATH - 1);
|
strncpy(playbackFiles->szFirstMoovAtomFile, optarg, IPTV_MAX_FILE_PATH - 1);
|
||||||
playbackFiles->szFirstMoovAtomFile[IPTV_MAX_FILE_PATH] = '\0';
|
playbackFiles->szFirstMoovAtomFile[IPTV_MAX_FILE_PATH] = '\0';
|
||||||
map_inter_file_path(playbackFiles->szFirstMoovAtomFile);
|
map_inter_file_path(playbackFiles->szFirstMoovAtomFile);
|
||||||
@@ -654,6 +656,7 @@ static int ParseParams(int argc, char *argv[], PlayFiles_t *playbackFiles, int *
|
|||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
playbackFiles->szFirstFile = malloc(IPTV_MAX_FILE_PATH);
|
playbackFiles->szFirstFile = malloc(IPTV_MAX_FILE_PATH);
|
||||||
|
playbackFiles->szFirstFile[0] = '\0';
|
||||||
if (NULL == strstr(argv[optind], "://"))
|
if (NULL == strstr(argv[optind], "://"))
|
||||||
{
|
{
|
||||||
strcpy(playbackFiles->szFirstFile, "file://");
|
strcpy(playbackFiles->szFirstFile, "file://");
|
||||||
@@ -685,7 +688,7 @@ int main(int argc, char *argv[])
|
|||||||
memset(argvBuff, '\0', sizeof(argvBuff));
|
memset(argvBuff, '\0', sizeof(argvBuff));
|
||||||
int commandRetVal = -1;
|
int commandRetVal = -1;
|
||||||
/* inform client that we can handle additional commands */
|
/* inform client that we can handle additional commands */
|
||||||
fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 46);
|
fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 47);
|
||||||
|
|
||||||
PlayFiles_t playbackFiles;
|
PlayFiles_t playbackFiles;
|
||||||
memset(&playbackFiles, 0x00, sizeof(playbackFiles));
|
memset(&playbackFiles, 0x00, sizeof(playbackFiles));
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
@@ -309,8 +310,13 @@ int32_t LinuxDvbBuffClose(Context_t *context __attribute__((unused)))
|
|||||||
pthread_cond_signal(&bufferingdDataAddedCond);
|
pthread_cond_signal(&bufferingdDataAddedCond);
|
||||||
|
|
||||||
/* wait for thread end */
|
/* wait for thread end */
|
||||||
|
#if 0
|
||||||
|
/* This code couse symbol versioning of clock_gettime@GLIBC_2.17 */
|
||||||
clock_gettime(CLOCK_REALTIME, &max_wait);
|
clock_gettime(CLOCK_REALTIME, &max_wait);
|
||||||
max_wait.tv_sec += 1;
|
max_wait.tv_sec += 1;
|
||||||
|
#else
|
||||||
|
max_wait.tv_sec = time(NULL) + 2;
|
||||||
|
#endif
|
||||||
pthread_cond_timedwait(&bufferingExitCond, &bufferingMtx, &max_wait);
|
pthread_cond_timedwait(&bufferingExitCond, &bufferingMtx, &max_wait);
|
||||||
pthread_mutex_unlock(&bufferingMtx);
|
pthread_mutex_unlock(&bufferingMtx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user