eplayer3: fix playback termination handling

Origin commit data
------------------
Branch: master
Commit: 56b3c7e01d
Author: martii <m4rtii@gmx.de>
Date: 2014-03-09 (Sun, 09 Mar 2014)


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

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-03-09 14:16:45 +01:00
parent 155f386725
commit d1ba6fd7bf
3 changed files with 5 additions and 3 deletions

View File

@@ -799,7 +799,7 @@ static void FFMPEGThread(Context_t * context)
avcodec_free_frame(&decoded_frame);
if (context->playback)
context->playback->abortRequested = 1;
context->playback->abortPlayback = 1;
hasPlayThreadStarted = 0;
ffmpeg_printf(10, "terminating\n");
@@ -813,7 +813,7 @@ static int terminating = 0;
static int interrupt_cb(void *ctx)
{
PlaybackHandler_t *p = (PlaybackHandler_t *) ctx;
return p->abortRequested;
return p->abortPlayback | p->abortRequested;
}
static void log_callback(void *ptr __attribute__ ((unused)), int lvl __attribute__ ((unused)), const char *format, va_list ap)

View File

@@ -39,6 +39,7 @@ typedef struct PlaybackHandler_s {
unsigned char isTeletext;
unsigned char mayWriteToFramebuffer;
unsigned char abortRequested;
unsigned char abortPlayback;
int (*Command) ( /*Context_t */ void *, PlaybackCmd_t, void *);
char *uri;

View File

@@ -78,7 +78,7 @@ static void SupervisorThread(Context_t * context)
playback_printf(10, ">\n");
while (context && context->playback && context->playback->isPlaying
&& !context->playback->abortRequested)
&& !(context->playback->abortRequested | context->playback->abortPlayback))
usleep(100000);
playback_printf(10, "<\n");
@@ -1013,6 +1013,7 @@ PlaybackHandler_t PlaybackHandler = {
0,
1,
0,
0,
&Command,
"",
0,