changeset 25241:bb7c65f2a289

Make m_option_t arrays referenced by cfg-common.h const
author reimar
date Sun, 02 Dec 2007 21:26:23 +0000
parents 525f22b6429b
children 371a40dcc1cc
files cfg-common.h libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_xvid4.c libmpdemux/demux_lavf.c libmpdemux/demux_rawaudio.c libmpdemux/demux_rawvideo.c stream/stream_cdda.c stream/stream_dvb.c
diffstat 8 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common.h	Sun Dec 02 20:48:16 2007 +0000
+++ b/cfg-common.h	Sun Dec 02 21:26:23 2007 +0000
@@ -376,9 +376,9 @@
 
 /* defined in libmpdemux: */
 extern int hr_mp3_seek;
-extern m_option_t demux_rawaudio_opts[];
-extern m_option_t demux_rawvideo_opts[];
-extern m_option_t cdda_opts[];
+extern const m_option_t demux_rawaudio_opts[];
+extern const m_option_t demux_rawvideo_opts[];
+extern const m_option_t cdda_opts[];
 
 extern char* sub_stream;
 extern int demuxer_type, audio_demuxer_type, sub_demuxer_type;
@@ -504,10 +504,10 @@
 
 #ifdef HAS_DVBIN_SUPPORT
 #include "stream/dvbin.h"
-extern m_config_t dvbin_opts_conf[];
+extern const m_config_t dvbin_opts_conf[];
 #endif
 
-extern m_option_t lavfdopts_conf[];
+extern const m_option_t lavfdopts_conf[];
 
 extern int rtspStreamOverTCP;
 extern int rtsp_transport_tcp;
@@ -704,8 +704,8 @@
 };
 #endif /* WIN32 */
 
-extern m_option_t lavc_decode_opts_conf[];
-extern m_option_t xvid_dec_opts[];
+extern const m_option_t lavc_decode_opts_conf[];
+extern const m_option_t xvid_dec_opts[];
 
 int dvd_parse_chapter_range(const m_option_t*, const char*);
 
--- a/libmpcodecs/vd_ffmpeg.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Dec 02 21:26:23 2007 +0000
@@ -91,7 +91,7 @@
 static int lavc_param_threads=1;
 static int lavc_param_bitexact=0;
 
-m_option_t lavc_decode_opts_conf[]={
+const m_option_t lavc_decode_opts_conf[]={
 	{"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 999999, NULL},
 	{"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
 	{"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
--- a/libmpcodecs/vd_xvid4.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/libmpcodecs/vd_xvid4.c	Sun Dec 02 21:26:23 2007 +0000
@@ -47,7 +47,7 @@
 static int lumadering = 0;
 static int chromadering = 0;
 
-m_option_t xvid_dec_opts[] = {
+const m_option_t xvid_dec_opts[] = {
 	{ "dr2", &do_dr2, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{ "nodr2", &do_dr2, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{ "filmeffect", &filmeffect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
--- a/libmpdemux/demux_lavf.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/libmpdemux/demux_lavf.c	Sun Dec 02 21:26:23 2007 +0000
@@ -52,7 +52,7 @@
 static char *opt_cryptokey;
 extern int ts_prog;
 
-m_option_t lavfdopts_conf[] = {
+const m_option_t lavfdopts_conf[] = {
 	{"probesize", &(opt_probesize), CONF_TYPE_INT, CONF_RANGE, 32, INT_MAX, NULL},
 	{"format",    &(opt_format),    CONF_TYPE_STRING,       0,  0,       0, NULL},
 	{"analyzeduration",    &(opt_analyzeduration),    CONF_TYPE_INT,       CONF_RANGE,  0,       INT_MAX, NULL},
--- a/libmpdemux/demux_rawaudio.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/libmpdemux/demux_rawaudio.c	Sun Dec 02 21:26:23 2007 +0000
@@ -20,7 +20,7 @@
 static int bitrate = 0;
 static int format = 0x1; // Raw PCM
 
-m_option_t demux_rawaudio_opts[] = {
+const m_option_t demux_rawaudio_opts[] = {
   { "channels", &channels, CONF_TYPE_INT,CONF_RANGE,1,8, NULL },
   { "rate", &samplerate, CONF_TYPE_INT,CONF_RANGE,1000,8*48000, NULL },
   { "samplesize", &samplesize, CONF_TYPE_INT,CONF_RANGE,1,8, NULL },
--- a/libmpdemux/demux_rawvideo.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/libmpdemux/demux_rawvideo.c	Sun Dec 02 21:26:23 2007 +0000
@@ -22,7 +22,7 @@
 static float fps = 25;
 static int imgsize=0;
 
-m_option_t demux_rawvideo_opts[] = {
+const m_option_t demux_rawvideo_opts[] = {
   // size:
   { "w", &width, CONF_TYPE_INT,CONF_RANGE,1,8192, NULL },
   { "h", &height, CONF_TYPE_INT,CONF_RANGE,1,8192, NULL },
--- a/stream/stream_cdda.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/stream/stream_cdda.c	Sun Dec 02 21:26:23 2007 +0000
@@ -73,7 +73,7 @@
 };
 
 /// We keep these options but now they set the defaults
-m_option_t cdda_opts[] = {
+const m_option_t cdda_opts[] = {
   { "speed", &cdda_dflts.speed, CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL },
   { "paranoia", &cdda_dflts.paranoia_mode, CONF_TYPE_INT,M_OPT_RANGE, 0, 2, NULL },
   { "generic-dev", &cdda_dflts.generic_dev, CONF_TYPE_STRING, 0, 0, 0, NULL },
--- a/stream/stream_dvb.c	Sun Dec 02 20:48:16 2007 +0000
+++ b/stream/stream_dvb.c	Sun Dec 02 21:26:23 2007 +0000
@@ -98,7 +98,7 @@
 
 
 
-m_option_t dvbin_opts_conf[] = {
+const m_option_t dvbin_opts_conf[] = {
 	{"prog", &stream_defaults.prog, CONF_TYPE_STRING, 0, 0 ,0, NULL},
 	{"card", &stream_defaults.card, CONF_TYPE_INT, M_OPT_RANGE, 1, 4, NULL},
 	{"type", "DVB card type is autodetected and can't be overridden\n", CONF_TYPE_PRINT, CONF_NOCFG, 0 ,0, NULL},