[MPlayer-cvslog] r36861 - in trunk: libmpcodecs/vf_scale.c m_option.c m_option.h

reimar subversion at mplayerhq.hu
Sun Feb 16 17:29:59 CET 2014


Author: reimar
Date: Sun Feb 16 17:29:59 2014
New Revision: 36861

Log:
m_option, vf_scale: Add some missing const.

Modified:
   trunk/libmpcodecs/vf_scale.c
   trunk/m_option.c
   trunk/m_option.h

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sun Feb 16 17:29:58 2014	(r36860)
+++ trunk/libmpcodecs/vf_scale.c	Sun Feb 16 17:29:59 2014	(r36861)
@@ -654,7 +654,7 @@ struct SwsContext *sws_getContextFromCmd
 
 /// An example of presets usage
 static const struct size_preset {
-  char* name;
+  const char* name;
   int w, h;
 } vf_size_presets_defs[] = {
   // TODO add more 'standard' resolutions

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Sun Feb 16 17:29:58 2014	(r36860)
+++ trunk/m_option.c	Sun Feb 16 17:29:59 2014	(r36861)
@@ -1962,9 +1962,9 @@ const m_option_type_t m_option_type_obj_
 static int parse_obj_presets(const m_option_t* opt,const char *name,
 			    const char *param, void* dst, int src) {
   m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv;
-  m_struct_t *in_desc,*out_desc;
+  const m_struct_t *in_desc,*out_desc;
   int s,i;
-  unsigned char* pre;
+  const unsigned char* pre;
   char* pre_name = NULL;
 
   if(!obj_p) {

Modified: trunk/m_option.h
==============================================================================
--- trunk/m_option.h	Sun Feb 16 17:29:58 2014	(r36860)
+++ trunk/m_option.h	Sun Feb 16 17:29:59 2014	(r36861)
@@ -122,13 +122,13 @@ extern const m_option_type_t m_option_ty
 /// Extra definition needed for \ref m_option_type_obj_presets options.
 typedef struct {
   /// Description of the struct holding the presets.
-  struct m_struct_st* in_desc;
+  const struct m_struct_st* in_desc;
   /// Description of the struct that should be set by the presets.
-  struct m_struct_st* out_desc;
+  const struct m_struct_st* out_desc;
   /// Pointer to an array of structs defining the various presets.
-  void* presets;
+  const void* presets;
   /// Offset of the preset's name inside the in_struct.
-  void* name_off;
+  const void* name_off;
 } m_obj_presets_t;
 
 /// Set several fields in a struct at once.


More information about the MPlayer-cvslog mailing list