libeplayer3: speed up termination

Origin commit data
------------------
Branch: master
Commit: 539f41f46d
Author: martii <m4rtii@gmx.de>
Date: 2013-11-02 (Sat, 02 Nov 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-11-02 16:02:33 +01:00
parent 521df793f9
commit bab1a7f264
2 changed files with 8 additions and 2 deletions

View File

@@ -826,6 +826,9 @@ static void FFMPEGThread(Context_t *context) {
releaseMutex(FILENAME, __FUNCTION__,__LINE__);
} /* while */
if (context && context->playback && context->output && context->playback->abortRequested)
context->output->Command(context, OUTPUT_CLEAR, NULL);
if (swr)
swr_free(&swr);
if (decoded_frame)

View File

@@ -116,7 +116,9 @@ status = 1;
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);
@@ -125,7 +127,8 @@ status = 1;
if (ret != cERR_PLAYBACK_NO_ERROR || playPts + (2 * 90000) >= lastPts)
dieNow = 1;
} else
}
else
{
playback_err("playback already died ?\n");
dieNow = 1;