diff options
-rw-r--r-- | xine_frontend.c | 11 | ||||
-rw-r--r-- | xine_frontend.h | 7 |
2 files changed, 13 insertions, 5 deletions
diff --git a/xine_frontend.c b/xine_frontend.c index deb8e40f..59f70a68 100644 --- a/xine_frontend.c +++ b/xine_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.79 2008-11-13 11:05:33 phintuka Exp $ + * $Id: xine_frontend.c,v 1.80 2008-11-13 21:24:56 phintuka Exp $ * */ @@ -724,6 +724,7 @@ static int fe_xine_open(frontend_t *this_gen, const char *mrl) this->input_plugin = NULL; this->playback_finished = 1; + this->terminate_key_pressed = 0; asprintf(&url, "%s#nocache;demux:mpeg_block", mrl ? : MRL_ID "://"); @@ -1171,14 +1172,16 @@ static int fe_is_finished(frontend_t *this_gen, int slave_stream) fe_t *this = (fe_t*)this_gen; if(!this || this->playback_finished) - return 1; + return FE_XINE_ERROR; + if(this->terminate_key_pressed) + return FE_XINE_EXIT; if(slave_stream) { if(!this->slave_stream || this->slave_playback_finished) - return 1; + return FE_XINE_EXIT; } - return 0; + return FE_XINE_RUNNING; } /************************** hooks to input plugin ****************************/ diff --git a/xine_frontend.h b/xine_frontend.h index 48eb7aa6..5251f066 100644 --- a/xine_frontend.h +++ b/xine_frontend.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.h,v 1.11 2008-11-13 11:06:24 phintuka Exp $ + * $Id: xine_frontend.h,v 1.12 2008-11-13 21:24:56 phintuka Exp $ * */ @@ -50,6 +50,11 @@ struct frontend_config_s { }; #endif +/* xine_is_finished return values */ +#define FE_XINE_RUNNING 0 +#define FE_XINE_ERROR -1 +#define FE_XINE_EXIT 1 + struct frontend_s { /* Display */ int (*fe_display_open)(frontend_t*, int winwidth, int winheight, |