# HG changeset patch # User reynaldo # Date 1154021706 0 # Node ID 5949a654e2d4df5b1d727f729fe0a04004274d05 # Parent 28d25943b7cf5774e4d1ca2098b95349902a2eb3 marks some read-only char* inside structs as const, patch by Stefan Huehner, stefan At huehner-org diff -r 28d25943b7cf -r 5949a654e2d4 libaf/af_karaoke.c --- a/libaf/af_karaoke.c Thu Jul 27 10:52:40 2006 +0000 +++ b/libaf/af_karaoke.c Thu Jul 27 17:35:06 2006 +0000 @@ -23,7 +23,7 @@ af->data->rate = ((af_data_t*)arg)->rate; af->data->nch = ((af_data_t*)arg)->nch; af->data->format= AF_FORMAT_FLOAT_NE; - af->data->bps = 4; + af->data->bps = 8; return af_test_output(af,(af_data_t*)arg); } return AF_UNKNOWN; @@ -41,7 +41,7 @@ { af_data_t* c = data; // Current working data float* a = c->audio; // Audio data - int len = c->len/4; // Number of samples in current audio block + int len = c->len/8; // Number of samples in current audio block int nch = c->nch; // Number of channels register int i; diff -r 28d25943b7cf -r 5949a654e2d4 libmpdemux/network.h --- a/libmpdemux/network.h Thu Jul 27 10:52:40 2006 +0000 +++ b/libmpdemux/network.h Thu Jul 27 17:35:06 2006 +0000 @@ -26,7 +26,7 @@ #define BUFFER_SIZE 2048 typedef struct { - char *mime_type; + const char *mime_type; int demuxer_type; } mime_struct_t; diff -r 28d25943b7cf -r 5949a654e2d4 libvo/gl_common.c --- a/libvo/gl_common.c Thu Jul 27 10:52:40 2006 +0000 +++ b/libvo/gl_common.c Thu Jul 27 17:35:06 2006 +0000 @@ -89,7 +89,7 @@ struct gl_name_map_struct { GLint value; - char *name; + const char *name; }; #undef MAP @@ -253,8 +253,8 @@ typedef struct { void **funcptr; - char *extstr; - char *funcnames[7]; + const char *extstr; + const char *funcnames[7]; } extfunc_desc_t; static const extfunc_desc_t extfuncs[] = { @@ -914,7 +914,7 @@ } static const struct { - char *name; + const char *name; GLenum cur; GLenum max; } progstats[] = { diff -r 28d25943b7cf -r 5949a654e2d4 m_option.c --- a/m_option.c Thu Jul 27 10:52:40 2006 +0000 +++ b/m_option.c Thu Jul 27 17:35:06 2006 +0000 @@ -996,7 +996,7 @@ /* FIXME: snyc with img_format.h */ static struct { - char* name; + const char* name; unsigned int fmt; } mp_imgfmt_list[] = { {"444p", IMGFMT_444P}, @@ -1090,7 +1090,7 @@ /* FIXME: snyc with af_format.h */ static struct { - char* name; + const char* name; unsigned int fmt; } mp_afmt_list[] = { // SPECIAL diff -r 28d25943b7cf -r 5949a654e2d4 m_struct.h --- a/m_struct.h Thu Jul 27 10:52:40 2006 +0000 +++ b/m_struct.h Thu Jul 27 17:35:06 2006 +0000 @@ -13,7 +13,7 @@ /// Struct definition typedef struct m_struct_st { /// For error messages and debugging - char* name; + const char* name; /// size of the whole struct unsigned int size; /// Pointer to a struct filled with the default settings diff -r 28d25943b7cf -r 5949a654e2d4 subopt-helper.h --- a/subopt-helper.h Thu Jul 27 10:52:40 2006 +0000 +++ b/subopt-helper.h Thu Jul 27 17:35:06 2006 +0000 @@ -20,7 +20,7 @@ /** simple structure for defining the option name, type and storage location */ typedef struct opt_s { - char * name; ///< string that identifies the option + const char * name; ///< string that identifies the option int type; ///< option type as defined in subopt-helper.h void * valp; ///< pointer to the mem where the value should be stored opt_test_f test; ///< argument test func ( optional )