mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libeplayer3: speed up termination
This commit is contained in:
@@ -826,6 +826,9 @@ static void FFMPEGThread(Context_t *context) {
|
|||||||
releaseMutex(FILENAME, __FUNCTION__,__LINE__);
|
releaseMutex(FILENAME, __FUNCTION__,__LINE__);
|
||||||
} /* while */
|
} /* while */
|
||||||
|
|
||||||
|
if (context && context->playback && context->output && context->playback->abortRequested)
|
||||||
|
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
||||||
|
|
||||||
if (swr)
|
if (swr)
|
||||||
swr_free(&swr);
|
swr_free(&swr);
|
||||||
if (decoded_frame)
|
if (decoded_frame)
|
||||||
|
@@ -116,7 +116,9 @@ status = 1;
|
|||||||
|
|
||||||
while (!dieNow)
|
while (!dieNow)
|
||||||
{
|
{
|
||||||
if (context && context->playback && context->playback->isPlaying)
|
if (context && context->playback && context->playback->abortRequested)
|
||||||
|
dieNow = 1;
|
||||||
|
else if (context && context->playback && context->playback->isPlaying)
|
||||||
{
|
{
|
||||||
int ret = context->playback->Command(context, PLAYBACK_PTS, &playPts);
|
int ret = context->playback->Command(context, PLAYBACK_PTS, &playPts);
|
||||||
|
|
||||||
@@ -125,7 +127,8 @@ status = 1;
|
|||||||
if (ret != cERR_PLAYBACK_NO_ERROR || playPts + (2 * 90000) >= lastPts)
|
if (ret != cERR_PLAYBACK_NO_ERROR || playPts + (2 * 90000) >= lastPts)
|
||||||
dieNow = 1;
|
dieNow = 1;
|
||||||
|
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
playback_err("playback already died ?\n");
|
playback_err("playback already died ?\n");
|
||||||
dieNow = 1;
|
dieNow = 1;
|
||||||
|
Reference in New Issue
Block a user