diff options
Diffstat (limited to 'src/libspucc/xine_cc_decoder.c')
-rw-r--r-- | src/libspucc/xine_cc_decoder.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index 9cdb4c4ea..12a5e7132 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2008 the xine project * * This file is part of xine, a free video player. * @@ -20,6 +20,10 @@ * closed caption spu decoder. receive data by events. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -33,6 +37,12 @@ #define LOG_DEBUG 1 */ +const char *cc_schemes[NUM_CC_PALETTES + 1] = { + "White/Gray/Translucent", + "White/Black/Solid", + NULL +}; + typedef struct spucc_decoder_s { spu_decoder_t spu_decoder; @@ -193,7 +203,7 @@ static void spucc_register_cfg_vars(spucc_class_t *this, cc_vars->cc_scheme = xine_cfg->register_enum(xine_cfg, "subtitles.closedcaption.scheme", 0, - cc_schemes, + (char **)cc_schemes, _("closed-captioning foreground/background scheme"), _("Choose your favourite rendering of the closed " "captions."), @@ -301,7 +311,7 @@ static spu_decoder_t *spudec_open_plugin (spu_decoder_class_t *class, xine_strea spucc_decoder_t *this ; - this = (spucc_decoder_t *) xine_xmalloc (sizeof (spucc_decoder_t)); + this = (spucc_decoder_t *) calloc(1, sizeof(spucc_decoder_t)); this->spu_decoder.decode_data = spudec_decode_data; this->spu_decoder.reset = spudec_reset; @@ -338,7 +348,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { spucc_class_t *this ; - this = (spucc_class_t *) xine_xmalloc (sizeof (spucc_class_t)); + this = (spucc_class_t *) calloc(1, sizeof(spucc_class_t)); this->spu_class.open_plugin = spudec_open_plugin; this->spu_class.get_identifier = spudec_get_identifier; |