[MPlayer-cvslog] r19199 - in trunk: libaf/af_karaoke.c libmpdemux/network.h libvo/gl_common.c m_option.c m_struct.h subopt-helper.h

reynaldo subversion at mplayerhq.hu
Thu Jul 27 19:35:07 CEST 2006


Author: reynaldo
Date: Thu Jul 27 19:35:06 2006
New Revision: 19199

Modified:
   trunk/libaf/af_karaoke.c
   trunk/libmpdemux/network.h
   trunk/libvo/gl_common.c
   trunk/m_option.c
   trunk/m_struct.h
   trunk/subopt-helper.h

Log:
marks some read-only char* inside structs as const, patch by Stefan Huehner, stefan At huehner-org

Modified: trunk/libaf/af_karaoke.c
==============================================================================
--- trunk/libaf/af_karaoke.c	(original)
+++ trunk/libaf/af_karaoke.c	Thu Jul 27 19:35:06 2006
@@ -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;
 

Modified: trunk/libmpdemux/network.h
==============================================================================
--- trunk/libmpdemux/network.h	(original)
+++ trunk/libmpdemux/network.h	Thu Jul 27 19:35:06 2006
@@ -26,7 +26,7 @@
 #define BUFFER_SIZE		2048
 
 typedef struct {
-	char *mime_type;
+	const char *mime_type;
 	int demuxer_type;
 } mime_struct_t;
 

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	(original)
+++ trunk/libvo/gl_common.c	Thu Jul 27 19:35:06 2006
@@ -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[] = {

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	(original)
+++ trunk/m_option.c	Thu Jul 27 19:35:06 2006
@@ -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

Modified: trunk/m_struct.h
==============================================================================
--- trunk/m_struct.h	(original)
+++ trunk/m_struct.h	Thu Jul 27 19:35:06 2006
@@ -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

Modified: trunk/subopt-helper.h
==============================================================================
--- trunk/subopt-helper.h	(original)
+++ trunk/subopt-helper.h	Thu Jul 27 19:35:06 2006
@@ -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 )



More information about the MPlayer-cvslog mailing list