[MPlayer-cvslog] r30676 - in trunk/libmpcodecs: ad.c ad.h ad_internal.h

diego subversion at mplayerhq.hu
Sat Feb 20 22:27:50 CET 2010


Author: diego
Date: Sat Feb 20 22:27:49 2010
New Revision: 30676

Log:
Mark ad_functions_t structures and mpcodecs_ad_drivers array as const.

Modified:
   trunk/libmpcodecs/ad.c
   trunk/libmpcodecs/ad.h
   trunk/libmpcodecs/ad_internal.h

Modified: trunk/libmpcodecs/ad.c
==============================================================================
--- trunk/libmpcodecs/ad.c	Sat Feb 20 22:02:49 2010	(r30675)
+++ trunk/libmpcodecs/ad.c	Sat Feb 20 22:27:49 2010	(r30676)
@@ -32,34 +32,34 @@
 /* Missed vorbis, mad, dshow */
 
 //extern ad_functions_t mpcodecs_ad_null;
-extern ad_functions_t mpcodecs_ad_mp3lib;
-extern ad_functions_t mpcodecs_ad_ffmpeg;
-extern ad_functions_t mpcodecs_ad_liba52;
-extern ad_functions_t mpcodecs_ad_hwac3;
-extern ad_functions_t mpcodecs_ad_hwmpa;
-extern ad_functions_t mpcodecs_ad_pcm;
-extern ad_functions_t mpcodecs_ad_dvdpcm;
-extern ad_functions_t mpcodecs_ad_alaw;
-extern ad_functions_t mpcodecs_ad_imaadpcm;
-extern ad_functions_t mpcodecs_ad_msadpcm;
-extern ad_functions_t mpcodecs_ad_dk3adpcm;
-extern ad_functions_t mpcodecs_ad_dk4adpcm;
-extern ad_functions_t mpcodecs_ad_dshow;
-extern ad_functions_t mpcodecs_ad_dmo;
-extern ad_functions_t mpcodecs_ad_acm;
-extern ad_functions_t mpcodecs_ad_msgsm;
-extern ad_functions_t mpcodecs_ad_faad;
-extern ad_functions_t mpcodecs_ad_libvorbis;
-extern ad_functions_t mpcodecs_ad_speex;
-extern ad_functions_t mpcodecs_ad_libmad;
-extern ad_functions_t mpcodecs_ad_realaud;
-extern ad_functions_t mpcodecs_ad_libdv;
-extern ad_functions_t mpcodecs_ad_qtaudio;
-extern ad_functions_t mpcodecs_ad_twin;
-extern ad_functions_t mpcodecs_ad_libmusepack;
-extern ad_functions_t mpcodecs_ad_libdca;
+extern const ad_functions_t mpcodecs_ad_mp3lib;
+extern const ad_functions_t mpcodecs_ad_ffmpeg;
+extern const ad_functions_t mpcodecs_ad_liba52;
+extern const ad_functions_t mpcodecs_ad_hwac3;
+extern const ad_functions_t mpcodecs_ad_hwmpa;
+extern const ad_functions_t mpcodecs_ad_pcm;
+extern const ad_functions_t mpcodecs_ad_dvdpcm;
+extern const ad_functions_t mpcodecs_ad_alaw;
+extern const ad_functions_t mpcodecs_ad_imaadpcm;
+extern const ad_functions_t mpcodecs_ad_msadpcm;
+extern const ad_functions_t mpcodecs_ad_dk3adpcm;
+extern const ad_functions_t mpcodecs_ad_dk4adpcm;
+extern const ad_functions_t mpcodecs_ad_dshow;
+extern const ad_functions_t mpcodecs_ad_dmo;
+extern const ad_functions_t mpcodecs_ad_acm;
+extern const ad_functions_t mpcodecs_ad_msgsm;
+extern const ad_functions_t mpcodecs_ad_faad;
+extern const ad_functions_t mpcodecs_ad_libvorbis;
+extern const ad_functions_t mpcodecs_ad_speex;
+extern const ad_functions_t mpcodecs_ad_libmad;
+extern const ad_functions_t mpcodecs_ad_realaud;
+extern const ad_functions_t mpcodecs_ad_libdv;
+extern const ad_functions_t mpcodecs_ad_qtaudio;
+extern const ad_functions_t mpcodecs_ad_twin;
+extern const ad_functions_t mpcodecs_ad_libmusepack;
+extern const ad_functions_t mpcodecs_ad_libdca;
 
-ad_functions_t* mpcodecs_ad_drivers[] =
+const ad_functions_t * const mpcodecs_ad_drivers[] =
 {
 //  &mpcodecs_ad_null,
 #ifdef CONFIG_MP3LIB

Modified: trunk/libmpcodecs/ad.h
==============================================================================
--- trunk/libmpcodecs/ad.h	Sat Feb 20 22:02:49 2010	(r30675)
+++ trunk/libmpcodecs/ad.h	Sat Feb 20 22:27:49 2010	(r30676)
@@ -36,7 +36,7 @@ typedef struct ad_functions_s
 } ad_functions_t;
 
 // NULL terminated array of all drivers
-extern ad_functions_t* mpcodecs_ad_drivers[];
+extern const ad_functions_t * const mpcodecs_ad_drivers[];
 
 // fallback if ADCTRL_RESYNC not implemented: sh_audio->a_in_buffer_len=0;
 #define ADCTRL_RESYNC_STREAM 1       /* resync, called after seeking! */

Modified: trunk/libmpcodecs/ad_internal.h
==============================================================================
--- trunk/libmpcodecs/ad_internal.h	Sat Feb 20 22:02:49 2010	(r30675)
+++ trunk/libmpcodecs/ad_internal.h	Sat Feb 20 22:27:49 2010	(r30676)
@@ -35,7 +35,7 @@ static void uninit(sh_audio_t *sh);
 static int control(sh_audio_t *sh,int cmd,void* arg, ...);
 static int decode_audio(sh_audio_t *sh,unsigned char *buffer,int minlen,int maxlen);
 
-#define LIBAD_EXTERN(x) ad_functions_t mpcodecs_ad_##x = {\
+#define LIBAD_EXTERN(x) const ad_functions_t mpcodecs_ad_##x = {\
 	&info,\
 	preinit,\
 	init,\


More information about the MPlayer-cvslog mailing list