diff options
Diffstat (limited to 'src/input/input_dvd.c')
-rw-r--r-- | src/input/input_dvd.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 446b7c778..02017956e 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -85,9 +85,9 @@ #endif /* Xine includes */ -#include "xineutils.h" -#include "buffer.h" -#include "xine_internal.h" +#include <xine/xineutils.h> +#include <xine/buffer.h> +#include <xine/xine_internal.h> #include "media_helper.h" /* Print debug messages? */ @@ -225,7 +225,7 @@ typedef struct { int32_t region; int32_t play_single_chapter; - char *filelist[MAX_DIR_ENTRIES]; + const char *filelist[MAX_DIR_ENTRIES]; } dvd_input_class_t; @@ -332,7 +332,7 @@ static void send_mouse_enter_leave_event(dvd_input_plugin_t *this, int direction this->mouse_in = !this->mouse_in; if(direction != this->mouse_in) { - const xine_spu_button_t spu_event = { + xine_spu_button_t spu_event = { .direction = direction, .button = this->mouse_buttonN }; @@ -1374,10 +1374,7 @@ check_solaris_vold_device(dvd_input_class_t *this) (volume_action = getenv("VOLUME_ACTION")) != NULL && strcmp(volume_action, "insert") == 0) { - device = malloc(strlen(volume_device) + strlen(volume_name) + 2); - if (device == NULL) - return; - sprintf(device, "%s/%s", volume_device, volume_name); + asprintf(&device, "%s/%s", volume_device, volume_name); if (stat(device, &stb) != 0 || !S_ISCHR(stb.st_mode)) { free(device); return; @@ -1624,12 +1621,12 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { static input_plugin_t *dvd_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *data) { dvd_input_plugin_t *this; dvd_input_class_t *class = (dvd_input_class_t*)class_gen; - static char *handled_mrl = "dvd:/"; + static const char handled_mrl[] = "dvd:/"; trace_print("Called\n"); /* Check we can handle this MRL */ - if (strncasecmp (data, handled_mrl, strlen(handled_mrl) ) != 0) + if (strncasecmp (data, handled_mrl, sizeof(handled_mrl)-1 ) != 0) return NULL; this = (dvd_input_plugin_t *) xine_xmalloc (sizeof (dvd_input_plugin_t)); @@ -1743,9 +1740,9 @@ static void *init_class (xine_t *xine, void *data) { dvd_input_class_t *this; config_values_t *config = xine->config; void *dvdcss; - static const char *skip_modes[] = {"skip program", "skip part", "skip title", NULL}; - static const char *seek_modes[] = {"seek in program chain", "seek in program", NULL}; - static const char *play_single_chapter_modes[] = {"entire dvd", "one chapter", NULL}; + static const char *const skip_modes[] = {"skip program", "skip part", "skip title", NULL}; + static const char *const seek_modes[] = {"seek in program chain", "seek in program", NULL}; + static const char *const play_single_chapter_modes[] = {"entire dvd", "one chapter", NULL}; trace_print("Called\n"); #ifdef INPUT_DEBUG |