Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4c1b96c3
Commit
4c1b96c3
authored
Nov 01, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: make the suffixes and mime_types arrays really const
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
parent
0b614fba
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
41 additions
and
32 deletions
+41
-32
aac_plugin.c
src/decoder/aac_plugin.c
+2
-2
audiofile_plugin.c
src/decoder/audiofile_plugin.c
+3
-1
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+2
-2
flac_plugin.c
src/decoder/flac_plugin.c
+11
-9
mod_plugin.c
src/decoder/mod_plugin.c
+2
-1
mp3_plugin.c
src/decoder/mp3_plugin.c
+2
-2
mp4_plugin.c
src/decoder/mp4_plugin.c
+2
-2
mpc_plugin.c
src/decoder/mpc_plugin.c
+1
-1
oggflac_plugin.c
src/decoder/oggflac_plugin.c
+7
-5
oggvorbis_plugin.c
src/decoder/oggvorbis_plugin.c
+7
-5
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+2
-2
No files found.
src/decoder/aac_plugin.c
View file @
4c1b96c3
...
...
@@ -586,8 +586,8 @@ static struct tag *aacTagDup(const char *file)
return
ret
;
}
static
const
char
*
aac_suffixes
[]
=
{
"aac"
,
NULL
};
static
const
char
*
aac_mimeTypes
[]
=
{
"audio/aac"
,
"audio/aacp"
,
NULL
};
static
const
char
*
const
aac_suffixes
[]
=
{
"aac"
,
NULL
};
static
const
char
*
const
aac_mimeTypes
[]
=
{
"audio/aac"
,
"audio/aacp"
,
NULL
};
const
struct
decoder_plugin
aacPlugin
=
{
.
name
=
"aac"
,
...
...
src/decoder/audiofile_plugin.c
View file @
4c1b96c3
...
...
@@ -133,7 +133,9 @@ static struct tag *audiofileTagDup(const char *file)
return
ret
;
}
static
const
char
*
audiofileSuffixes
[]
=
{
"wav"
,
"au"
,
"aiff"
,
"aif"
,
NULL
};
static
const
char
*
const
audiofileSuffixes
[]
=
{
"wav"
,
"au"
,
"aiff"
,
"aif"
,
NULL
};
const
struct
decoder_plugin
audiofilePlugin
=
{
.
name
=
"audiofile"
,
...
...
src/decoder/ffmpeg_plugin.c
View file @
4c1b96c3
...
...
@@ -359,14 +359,14 @@ static struct tag *ffmpeg_tag(const char *file)
* only that files
*/
static
const
char
*
ffmpeg_Suffixes
[]
=
{
static
const
char
*
const
ffmpeg_Suffixes
[]
=
{
"wma"
,
"asf"
,
"wmv"
,
"mpeg"
,
"mpg"
,
"avi"
,
"vob"
,
"mov"
,
"qt"
,
"swf"
,
"rm"
,
"swf"
,
"mp1"
,
"mp2"
,
"mp3"
,
"mp4"
,
"m4a"
,
"flac"
,
"ogg"
,
"wav"
,
"au"
,
"aiff"
,
"aif"
,
"ac3"
,
"aac"
,
"mpc"
,
NULL
};
//not sure if this is correct...
static
const
char
*
ffmpeg_Mimetypes
[]
=
{
static
const
char
*
const
ffmpeg_Mimetypes
[]
=
{
"video/x-ms-asf"
,
"audio/x-ms-wma"
,
"audio/x-ms-wax"
,
...
...
src/decoder/flac_plugin.c
View file @
4c1b96c3
...
...
@@ -429,11 +429,13 @@ oggflac_try_decode(struct input_stream *inStream)
ogg_stream_type_detect
(
inStream
)
==
FLAC
;
}
static
const
char
*
oggflac_suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
oggflac_mime_types
[]
=
{
"audio/x-flac+ogg"
,
"application/ogg"
,
"application/x-ogg"
,
NULL
};
static
const
char
*
const
oggflac_suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
const
oggflac_mime_types
[]
=
{
"audio/x-flac+ogg"
,
"application/ogg"
,
"application/x-ogg"
,
NULL
};
const
struct
decoder_plugin
oggflacPlugin
=
{
.
name
=
"oggflac"
,
...
...
@@ -447,10 +449,10 @@ const struct decoder_plugin oggflacPlugin = {
#endif
/* FLAC_API_VERSION_CURRENT >= 7 */
static
const
char
*
flacSuffixes
[]
=
{
"flac"
,
NULL
};
static
const
char
*
flac_mime_types
[]
=
{
"audio/x-flac"
,
"application/x-flac"
,
NULL
};
static
const
char
*
const
flacSuffixes
[]
=
{
"flac"
,
NULL
};
static
const
char
*
const
flac_mime_types
[]
=
{
"audio/x-flac"
,
"application/x-flac"
,
NULL
};
const
struct
decoder_plugin
flacPlugin
=
{
.
name
=
"flac"
,
...
...
src/decoder/mod_plugin.c
View file @
4c1b96c3
...
...
@@ -263,7 +263,8 @@ static struct tag *modTagDup(const char *file)
return
ret
;
}
static
const
char
*
modSuffixes
[]
=
{
"amf"
,
static
const
char
*
const
modSuffixes
[]
=
{
"amf"
,
"dsm"
,
"far"
,
"gdm"
,
...
...
src/decoder/mp3_plugin.c
View file @
4c1b96c3
...
...
@@ -1143,8 +1143,8 @@ static struct tag *mp3_tag_dup(const char *file)
return
ret
;
}
static
const
char
*
mp3_suffixes
[]
=
{
"mp3"
,
"mp2"
,
NULL
};
static
const
char
*
mp3_mime_types
[]
=
{
"audio/mpeg"
,
NULL
};
static
const
char
*
const
mp3_suffixes
[]
=
{
"mp3"
,
"mp2"
,
NULL
};
static
const
char
*
const
mp3_mime_types
[]
=
{
"audio/mpeg"
,
NULL
};
const
struct
decoder_plugin
mp3Plugin
=
{
.
name
=
"mp3"
,
...
...
src/decoder/mp4_plugin.c
View file @
4c1b96c3
...
...
@@ -410,8 +410,8 @@ static struct tag *mp4TagDup(const char *file)
return
ret
;
}
static
const
char
*
mp4_suffixes
[]
=
{
"m4a"
,
"mp4"
,
NULL
};
static
const
char
*
mp4_mimeTypes
[]
=
{
"audio/mp4"
,
"audio/m4a"
,
NULL
};
static
const
char
*
const
mp4_suffixes
[]
=
{
"m4a"
,
"mp4"
,
NULL
};
static
const
char
*
const
mp4_mimeTypes
[]
=
{
"audio/mp4"
,
"audio/m4a"
,
NULL
};
const
struct
decoder_plugin
mp4Plugin
=
{
.
name
=
"mp4"
,
...
...
src/decoder/mpc_plugin.c
View file @
4c1b96c3
...
...
@@ -295,7 +295,7 @@ static struct tag *mpcTagDup(const char *file)
return
ret
;
}
static
const
char
*
mpcSuffixes
[]
=
{
"mpc"
,
NULL
};
static
const
char
*
const
mpcSuffixes
[]
=
{
"mpc"
,
NULL
};
const
struct
decoder_plugin
mpcPlugin
=
{
.
name
=
"mpc"
,
...
...
src/decoder/oggflac_plugin.c
View file @
4c1b96c3
...
...
@@ -337,11 +337,13 @@ fail:
return
ret
;
}
static
const
char
*
oggflac_Suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
oggflac_mime_types
[]
=
{
"audio/x-flac+ogg"
,
"application/ogg"
,
"application/x-ogg"
,
NULL
};
static
const
char
*
const
oggflac_Suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
const
oggflac_mime_types
[]
=
{
"audio/x-flac+ogg"
,
"application/ogg"
,
"application/x-ogg"
,
NULL
};
const
struct
decoder_plugin
oggflacPlugin
=
{
.
name
=
"oggflac"
,
...
...
src/decoder/oggvorbis_plugin.c
View file @
4c1b96c3
...
...
@@ -368,11 +368,13 @@ oggvorbis_try_decode(struct input_stream *inStream)
return
ogg_stream_type_detect
(
inStream
)
==
VORBIS
;
}
static
const
char
*
oggvorbis_Suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
oggvorbis_MimeTypes
[]
=
{
"application/ogg"
,
"audio/x-vorbis+ogg"
,
"application/x-ogg"
,
NULL
};
static
const
char
*
const
oggvorbis_Suffixes
[]
=
{
"ogg"
,
"oga"
,
NULL
};
static
const
char
*
const
oggvorbis_MimeTypes
[]
=
{
"application/ogg"
,
"audio/x-vorbis+ogg"
,
"application/x-ogg"
,
NULL
};
const
struct
decoder_plugin
oggvorbisPlugin
=
{
.
name
=
"oggvorbis"
,
...
...
src/decoder/wavpack_plugin.c
View file @
4c1b96c3
...
...
@@ -559,8 +559,8 @@ wavpack_filedecode(struct decoder *decoder, const char *fname)
return
true
;
}
static
char
const
*
wavpackSuffixes
[]
=
{
"wv"
,
NULL
};
static
char
const
*
wavpackMimeTypes
[]
=
{
"audio/x-wavpack"
,
NULL
};
static
char
const
*
const
wavpackSuffixes
[]
=
{
"wv"
,
NULL
};
static
char
const
*
const
wavpackMimeTypes
[]
=
{
"audio/x-wavpack"
,
NULL
};
const
struct
decoder_plugin
wavpackPlugin
=
{
.
name
=
"wavpack"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment