Commit dcc5bdef authored by Christophe Massiot's avatar Christophe Massiot

* ALL: Fix warnings triggered by -Wwrite-strings, patch by Lionel Debroux.

parent 6fe437a4
......@@ -51,7 +51,7 @@ struct vo_instance_s {
typedef vo_instance_t * vo_open_t (void);
typedef struct {
char * name;
const char * name;
vo_open_t * open;
} vo_driver_t;
......
......@@ -142,8 +142,8 @@ vo_instance_t * vo_sdl_open (void)
instance->vo.close = NULL; /* sdl_close; */
instance->sdlflags = SDL_HWSURFACE | SDL_RESIZABLE;
putenv("SDL_VIDEO_YUV_HWACCEL=1");
putenv("SDL_VIDEO_X11_NODIRECTCOLOR=1");
putenv((char *)"SDL_VIDEO_YUV_HWACCEL=1");
putenv((char *)"SDL_VIDEO_X11_NODIRECTCOLOR=1");
if (SDL_Init (SDL_INIT_VIDEO)) {
fprintf (stderr, "sdl video initialization failed.\n");
......
......@@ -125,7 +125,7 @@ static void corrupt_arg (corrupt_t * corrupt, int type, char * s, char ** argv)
{
corrupt->type = type;
if (! *s)
s = ",0-0xff,0-";
s = (char *)",0-0xff,0-";
else if (*s != ',' || !isdigit (s[1]))
print_usage (argv);
corrupt->chunk_start = strtol (s + 1, &s, 0);
......@@ -136,7 +136,7 @@ static void corrupt_arg (corrupt_t * corrupt, int type, char * s, char ** argv)
else
print_usage (argv);
if (! *s)
s = ",32-";
s = (char *)",32-";
else if (*s != ',' || !isdigit (s[1]))
print_usage (argv);
corrupt->bit_start = strtol (s + 1, &s, 0);
......
......@@ -209,22 +209,22 @@ static void pic_code_del (const mpeg2_picture_t * pic)
void dump_state (FILE * f, mpeg2_state_t state, const mpeg2_info_t * info,
int offset, int verbose)
{
static char * state_name[] = {
static const char * state_name[] = {
"BUFFER", "SEQUENCE", "SEQUENCE_REPEATED", "SEQUENCE_MODIFIED", "GOP",
"PICTURE", "SLICE_1ST", "PICTURE_2ND", "SLICE", "END",
"INVALID", "INVALID_END"
};
static char * profile[] = { "HP", "Spatial", "SNR", "MP", "SP" };
static char * level[] = { "HL", "H-14", "ML", "LL" };
static char * profile2[] = { "422@HL", NULL, NULL, "422@ML",
static const char * profile[] = { "HP", "Spatial", "SNR", "MP", "SP" };
static const char * level[] = { "HL", "H-14", "ML", "LL" };
static const char * profile2[] = { "422@HL", NULL, NULL, "422@ML",
NULL, NULL, NULL, NULL, "MV@HL",
"MV@H-14", NULL, "MV@ML", "MV@LL" };
static char * video_fmt[] = { "COMPONENT", "PAL", "NTSC", "SECAM", "MAC"};
static char coding_type[] = { '0', 'I', 'P', 'B', 'D', '5', '6', '7'};
static char * colour[] = { NULL, "BT.709", "UNSPECIFIED", NULL,
static const char * video_fmt[] = { "COMPONENT", "PAL", "NTSC", "SECAM", "MAC"};
static const char coding_type[] = { '0', 'I', 'P', 'B', 'D', '5', '6', '7'};
static const char * colour[] = { NULL, "BT.709", "UNSPECIFIED", NULL,
"BT.470-2/M", "BT.470-2/B,G",
"SMPTE170M", "SMPTE240M", "LINEAR" };
static char * colour3[] = { NULL, "BT.709", "UNSPEC_COLORS", NULL, NULL,
static const char * colour3[] = { NULL, "BT.709", "UNSPEC_COLORS", NULL, NULL,
"BT.470-2/B,G", "SMPTE170M", "SMPTE240M" };
const mpeg2_sequence_t * seq = info->sequence;
const mpeg2_gop_t * gop = info->gop;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment