diff options
author | phintuka <phintuka> | 2010-01-03 21:51:49 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-01-03 21:51:49 +0000 |
commit | 89c3c88dc0e5193a6c24c97b3353e46d7f0fd5fe (patch) | |
tree | aa910828420b5f8f735a06d9d1c51a02c33d8c54 | |
parent | e5dfe9e6c38c90a59997a746fbdb1124404b92b0 (diff) | |
download | xineliboutput-89c3c88dc0e5193a6c24c97b3353e46d7f0fd5fe.tar.gz xineliboutput-89c3c88dc0e5193a6c24c97b3353e46d7f0fd5fe.tar.bz2 |
Added sanity checks:
xine_stop() and xine_close() need stream
do not try to unload post plugins if those haven't been initialized
-rw-r--r-- | xine_frontend.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/xine_frontend.c b/xine_frontend.c index 6703b0a9..abff77db 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.106 2009-12-29 14:08:11 phintuka Exp $ + * $Id: xine_frontend.c,v 1.107 2010-01-03 21:51:49 phintuka Exp $ * */ @@ -906,9 +906,11 @@ static void fe_post_rewire(const fe_t *this) static void fe_post_unload(const fe_t *this) { - LOGDBG("unloading post plugins"); - vpplugin_unload_post(this->postplugins, NULL); - applugin_unload_post(this->postplugins, NULL); + if (this->postplugins) { + LOGDBG("unloading post plugins"); + vpplugin_unload_post(this->postplugins, NULL); + applugin_unload_post(this->postplugins, NULL); + } } static void fe_post_close(const fe_t *this, const char *name, int which) @@ -1141,6 +1143,9 @@ static int fe_xine_stop(frontend_t *this_gen) this->input_plugin = NULL; this->playback_finished = 1; + if (!this->stream) + return 0; + xine_stop(this->stream); fe_post_unwire(this); @@ -1161,6 +1166,9 @@ static void fe_xine_close(frontend_t *this_gen) this->input_plugin->f.fe_control = NULL; } + if (!this->stream) + return; + fe_xine_stop(this_gen); fe_post_unload(this); |