diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2004-07-11 11:23:48 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2004-07-11 11:23:48 +0000 |
commit | 80d77b640625fc857782efd897b24ccda5890da4 (patch) | |
tree | 97243f9523851becb6d901c6edb98f2c2e72b1df | |
parent | 5b50bfc884b4e7f880d1ac39d27774ce4f23f305 (diff) | |
download | xine-lib-80d77b640625fc857782efd897b24ccda5890da4.tar.gz xine-lib-80d77b640625fc857782efd897b24ccda5890da4.tar.bz2 |
- add a work-around for aRts bug:
http://bugs.kde.org/show_bug.cgi?id=62603
and filed against Totem bug:
http://bugzilla.gnome.org/show_bug.cgi?id=138830
CVS patchset: 6787
CVS date: 2004/07/11 11:23:48
-rw-r--r-- | src/audio_out/audio_arts_out.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c index db9006c53..7cc516141 100644 --- a/src/audio_out/audio_arts_out.c +++ b/src/audio_out/audio_arts_out.c @@ -17,14 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_arts_out.c,v 1.26 2004/04/09 11:48:13 f1rmb Exp $ + * $Id: audio_arts_out.c,v 1.27 2004/07/11 11:23:48 hadess Exp $ */ -#ifndef __sun /* _XOPEN_SOURCE causes build prob's on sunos */ -/* required for swab() */ /* XXX: but swab is not used here at all? */ -#define _XOPEN_SOURCE 500 -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -81,6 +76,7 @@ typedef struct { audio_driver_class_t driver_class; xine_t *xine; + int inited; } arts_class_t; /* @@ -305,13 +301,20 @@ static int ao_arts_ctrl(ao_driver_t *this_gen, int cmd, ...) { static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *data) { arts_class_t *class = (arts_class_t *) class_gen; arts_driver_t *this; - int rc; + int rc; lprintf ("audio_arts_out: open_plugin called\n"); this = (arts_driver_t *) xine_xmalloc (sizeof (arts_driver_t)); - rc = arts_init(); + if (class->inited == 0) { + rc = arts_init(); + class->inited++; + } else { + xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_arts_out: not trying to initialise a second time\n"); + return NULL; + } + if (rc < 0) { xprintf (this->xine, XINE_VERBOSITY_DEBUG,"audio_arts_out: arts_init failed: %s\n", arts_error_text(rc)); return NULL; @@ -380,6 +383,7 @@ static void *init_class (xine_t *xine, void *data) { lprintf ("audio_arts_out: init class\n"); this = (arts_class_t *) xine_xmalloc (sizeof (arts_class_t)); + this->inited = 0; this->driver_class.open_plugin = open_plugin; this->driver_class.get_identifier = get_identifier; |