From 5951cbef51e43d12012b010fbdff0719afb62a5b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 10 Feb 2018 20:34:01 +0100 Subject: [PATCH 1/3] fix OUTPUT_PLAY error handling Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/0a2767edd29c7f8e496bd1764a37c0ae221c119f Author: Jacek Jendrzej Date: 2018-02-10 (Sat, 10 Feb 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/output/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libeplayer3-arm/output/output.c b/libeplayer3-arm/output/output.c index cf3640e..548c1d6 100644 --- a/libeplayer3-arm/output/output.c +++ b/libeplayer3-arm/output/output.c @@ -224,6 +224,9 @@ static int Command(void *_context, OutputCmd_t command, void *argument) { ret = context->output->video->Command(context, OUTPUT_PLAY, "video"); } + else + ret = cERR_OUTPUT_INTERNAL_ERROR; + // success or not executed, dunn care if (!ret) { From a357d08b456f25e6fa5bc0ddfee8fcfdca350e79 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 10 Feb 2018 20:41:24 +0100 Subject: [PATCH 2/3] remove isContainerRunning, this break next file play aufter eof stop Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c1cbb167142abf096507bb886b830f1f58d23498 Author: Jacek Jendrzej Date: 2018-02-10 (Sat, 10 Feb 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/container/container_ffmpeg.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/libeplayer3-arm/container/container_ffmpeg.c b/libeplayer3-arm/container/container_ffmpeg.c index 69eb4e9..58f4e9e 100644 --- a/libeplayer3-arm/container/container_ffmpeg.c +++ b/libeplayer3-arm/container/container_ffmpeg.c @@ -127,8 +127,6 @@ static AVFormatContext *avContextTab[IPTV_AV_CONTEXT_MAX_NUM] = {NULL, NULL}; static int32_t use_custom_io[IPTV_AV_CONTEXT_MAX_NUM] = {0, 0}; static AVDictionary *avio_opts = NULL; -static uint8_t isContainerRunning = 0; - static int64_t latestPts = 0; static int32_t restart_audio_resampling = 0; @@ -1626,12 +1624,6 @@ int32_t container_ffmpeg_init(Context_t *context, PlayFiles_t *playFilesNames) { ffmpeg_printf(10, "second filename %s\n", playFilesNames->szSecondFile); } - if (isContainerRunning) - { - ffmpeg_err("ups already running?\n"); - releaseMutex(__FILE__, __FUNCTION__, __LINE__); - return cERR_CONTAINER_FFMPEG_RUNNING; - } /* initialize ffmpeg */ avcodec_register_all(); av_register_all(); @@ -1656,7 +1648,6 @@ int32_t container_ffmpeg_init(Context_t *context, PlayFiles_t *playFilesNames) } terminating = 0; latestPts = 0; - isContainerRunning = 1; res = container_ffmpeg_update_tracks(context, playFilesNames->szFirstFile, 1); return res; } @@ -2241,11 +2232,6 @@ static int32_t container_ffmpeg_stop(Context_t *context) * and causes in most cases a segfault */ ffmpeg_printf(10, "\n"); - if (!isContainerRunning) - { - ffmpeg_err("Container not running\n"); - return cERR_CONTAINER_FFMPEG_ERR; - } if (context->playback) { context->playback->isPlaying = 0; @@ -2298,7 +2284,6 @@ static int32_t container_ffmpeg_stop(Context_t *context) { av_dict_free(&avio_opts); } - isContainerRunning = 0; avformat_network_deinit(); ffmpeg_buf_free(); releaseMutex(__FILE__, __FUNCTION__, __LINE__); From 0b3bcc162899c65612423e544c73048bc626a5da Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 11 Feb 2018 12:01:19 +0100 Subject: [PATCH 3/3] supplement to 4bd66ae15da86b413d6de64c51b3471dd8bc801a, fix segfault with only audio stream Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/e93920680b66ddc356ebf8c97d86df660f167616 Author: Jacek Jendrzej Date: 2018-02-11 (Sun, 11 Feb 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/output/output.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libeplayer3-arm/output/output.c b/libeplayer3-arm/output/output.c index 548c1d6..4943a11 100644 --- a/libeplayer3-arm/output/output.c +++ b/libeplayer3-arm/output/output.c @@ -228,12 +228,9 @@ static int Command(void *_context, OutputCmd_t command, void *argument) ret = cERR_OUTPUT_INTERNAL_ERROR; // success or not executed, dunn care - if (!ret) + if (context->playback->isAudio) { - if (context->playback->isAudio) - { - ret = context->output->audio->Command(context, OUTPUT_PLAY, "audio"); - } + ret = context->output->audio->Command(context, OUTPUT_PLAY, "audio"); } if (!ret) {