mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
try fix to call container_ffmpeg_stop on file EOF
Origin commit data
------------------
Branch: master
Commit: 2b935bf048
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-02-22 (Fri, 22 Feb 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -126,6 +126,7 @@ static int32_t container_ffmpeg_seek(Context_t *context, int64_t sec, uint8_t ab
|
||||
static int32_t container_ffmpeg_get_length(Context_t *context, int64_t *length);
|
||||
static int64_t calcPts(uint32_t avContextIdx, AVStream *stream, int64_t pts);
|
||||
static int64_t doCalcPts(int64_t start_time, const AVRational time_base, int64_t pts);
|
||||
static int32_t container_ffmpeg_stop(Context_t *context);
|
||||
|
||||
/* Progressive playback means that we play local file
|
||||
* but this local file can grows up, for example
|
||||
@@ -1352,6 +1353,11 @@ static void FFMPEGThread(Context_t *context)
|
||||
do_seek_target_seconds = 0;
|
||||
PlaybackDieNow(1);
|
||||
|
||||
if(context && context->playback)
|
||||
{
|
||||
container_ffmpeg_stop(context);
|
||||
}
|
||||
|
||||
ffmpeg_printf(10, "terminating\n");
|
||||
}
|
||||
|
||||
@@ -1533,8 +1539,7 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, uin
|
||||
0 == strncmp(filename, "file://", 7))
|
||||
{
|
||||
AVIOContext *avio_ctx = NULL;
|
||||
if(custom_io_tab[AVIdx] == NULL)//workaround for double malloc if container_ffmpeg_stop is not called after file play to end
|
||||
custom_io_tab[AVIdx] = malloc(sizeof(CustomIOCtx_t));
|
||||
custom_io_tab[AVIdx] = malloc(sizeof(CustomIOCtx_t));
|
||||
|
||||
memset(custom_io_tab[AVIdx], 0x00, sizeof(CustomIOCtx_t));
|
||||
|
||||
|
Reference in New Issue
Block a user