shout: constant plugin declarations
Declare both shout plugins "const", since they will never change, once initialized at compile time.
This commit is contained in:
parent
d9f170b5db
commit
ebd194998a
@ -29,13 +29,13 @@
|
||||
|
||||
static int shout_init_count;
|
||||
|
||||
static struct shout_encoder_plugin *const shout_encoder_plugins[] = {
|
||||
static const struct shout_encoder_plugin *const shout_encoder_plugins[] = {
|
||||
&shout_mp3_encoder,
|
||||
&shout_ogg_encoder,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct shout_encoder_plugin *
|
||||
static const struct shout_encoder_plugin *
|
||||
shout_encoder_plugin_get(const char *name)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -64,7 +64,7 @@ struct shout_data {
|
||||
shout_metadata_t *shout_meta;
|
||||
int shout_error;
|
||||
|
||||
struct shout_encoder_plugin *encoder;
|
||||
const struct shout_encoder_plugin *encoder;
|
||||
void *encoder_data;
|
||||
|
||||
float quality;
|
||||
@ -87,8 +87,8 @@ struct shout_data {
|
||||
struct shout_buffer buf;
|
||||
};
|
||||
|
||||
extern struct shout_encoder_plugin shout_mp3_encoder;
|
||||
extern struct shout_encoder_plugin shout_ogg_encoder;
|
||||
extern const struct shout_encoder_plugin shout_mp3_encoder;
|
||||
extern const struct shout_encoder_plugin shout_ogg_encoder;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -174,7 +174,7 @@ static int shout_mp3_encoder_encode(struct shout_data *sd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct shout_encoder_plugin shout_mp3_encoder = {
|
||||
const struct shout_encoder_plugin shout_mp3_encoder = {
|
||||
"mp3",
|
||||
SHOUT_FORMAT_MP3,
|
||||
|
||||
|
@ -289,7 +289,7 @@ static int shout_ogg_encoder_encode(struct shout_data *sd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct shout_encoder_plugin shout_ogg_encoder = {
|
||||
const struct shout_encoder_plugin shout_ogg_encoder = {
|
||||
"ogg",
|
||||
SHOUT_FORMAT_VORBIS,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user