libspark/player, libeplayer3/ffmpeg: improve termination handling

Origin commit data
------------------
Branch: master
Commit: 773553ddb5
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 12:58:29 +01:00
parent 8fa3fded80
commit e2c442c898
3 changed files with 13 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ extern ManagerHandler_t ManagerHandler;
#include "playback_libeplayer3.h"
#include "subtitle.h"
static Context_t *player;
static Context_t *player = NULL;
extern cAudio *audioDecoder;
extern cVideo *videoDecoder;
@@ -710,8 +710,17 @@ void cPlayback::SuspendSubtitle(bool b)
}
void cPlayback::RequestAbort() {
if (player->playback)
if (player && player->playback) {
player->playback->abortRequested = 1;
while (player->playback->isPlaying)
usleep(100000);
}
}
bool cPlayback::isPlaying() {
if (player && player->playback)
return player->playback->isPlaying;
return false;
}
#if 0
bool cPlayback::IsPlaying(void) const