mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
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:
@@ -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)
|
||||
|
@@ -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;
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user