Commit cd34bc76 authored by Reimar Döffinger's avatar Reimar Döffinger

Make ogg_codec_t descriptions const

Originally committed as revision 14948 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c1854592
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define MAX_PAGE_SIZE 65307 #define MAX_PAGE_SIZE 65307
#define DECODER_BUFFER_SIZE MAX_PAGE_SIZE #define DECODER_BUFFER_SIZE MAX_PAGE_SIZE
static ogg_codec_t *ogg_codecs[] = { static const ogg_codec_t * const ogg_codecs[] = {
&speex_codec, &speex_codec,
&vorbis_codec, &vorbis_codec,
&theora_codec, &theora_codec,
...@@ -126,7 +126,7 @@ ogg_reset (ogg_t * ogg) ...@@ -126,7 +126,7 @@ ogg_reset (ogg_t * ogg)
return 0; return 0;
} }
static ogg_codec_t * static const ogg_codec_t *
ogg_find_codec (uint8_t * buf, int size) ogg_find_codec (uint8_t * buf, int size)
{ {
int i; int i;
......
...@@ -75,15 +75,15 @@ typedef struct ogg { ...@@ -75,15 +75,15 @@ typedef struct ogg {
#define OGG_FLAG_BOS 2 #define OGG_FLAG_BOS 2
#define OGG_FLAG_EOS 4 #define OGG_FLAG_EOS 4
extern ogg_codec_t flac_codec; extern const ogg_codec_t flac_codec;
extern ogg_codec_t ogm_audio_codec; extern const ogg_codec_t ogm_audio_codec;
extern ogg_codec_t ogm_old_codec; extern const ogg_codec_t ogm_old_codec;
extern ogg_codec_t ogm_text_codec; extern const ogg_codec_t ogm_text_codec;
extern ogg_codec_t ogm_video_codec; extern const ogg_codec_t ogm_video_codec;
extern ogg_codec_t old_flac_codec; extern const ogg_codec_t old_flac_codec;
extern ogg_codec_t speex_codec; extern const ogg_codec_t speex_codec;
extern ogg_codec_t theora_codec; extern const ogg_codec_t theora_codec;
extern ogg_codec_t vorbis_codec; extern const ogg_codec_t vorbis_codec;
extern int vorbis_comment(AVFormatContext *ms, uint8_t *buf, int size); extern int vorbis_comment(AVFormatContext *ms, uint8_t *buf, int size);
......
...@@ -85,13 +85,13 @@ old_flac_header (AVFormatContext * s, int idx) ...@@ -85,13 +85,13 @@ old_flac_header (AVFormatContext * s, int idx)
return 0; return 0;
} }
ogg_codec_t flac_codec = { const ogg_codec_t flac_codec = {
.magic = "\177FLAC", .magic = "\177FLAC",
.magicsize = 5, .magicsize = 5,
.header = flac_header .header = flac_header
}; };
ogg_codec_t old_flac_codec = { const ogg_codec_t old_flac_codec = {
.magic = "fLaC", .magic = "fLaC",
.magicsize = 4, .magicsize = 4,
.header = old_flac_header .header = old_flac_header
......
...@@ -149,28 +149,28 @@ ogm_packet(AVFormatContext *s, int idx) ...@@ -149,28 +149,28 @@ ogm_packet(AVFormatContext *s, int idx)
return 0; return 0;
} }
ogg_codec_t ogm_video_codec = { const ogg_codec_t ogm_video_codec = {
.magic = "\001video", .magic = "\001video",
.magicsize = 6, .magicsize = 6,
.header = ogm_header, .header = ogm_header,
.packet = ogm_packet .packet = ogm_packet
}; };
ogg_codec_t ogm_audio_codec = { const ogg_codec_t ogm_audio_codec = {
.magic = "\001audio", .magic = "\001audio",
.magicsize = 6, .magicsize = 6,
.header = ogm_header, .header = ogm_header,
.packet = ogm_packet .packet = ogm_packet
}; };
ogg_codec_t ogm_text_codec = { const ogg_codec_t ogm_text_codec = {
.magic = "\001text", .magic = "\001text",
.magicsize = 5, .magicsize = 5,
.header = ogm_header, .header = ogm_header,
.packet = ogm_packet .packet = ogm_packet
}; };
ogg_codec_t ogm_old_codec = { const ogg_codec_t ogm_old_codec = {
.magic = "\001Direct Show Samples embedded in Ogg", .magic = "\001Direct Show Samples embedded in Ogg",
.magicsize = 35, .magicsize = 35,
.header = ogm_dshow_header, .header = ogm_dshow_header,
......
...@@ -54,7 +54,7 @@ static int speex_header(AVFormatContext *s, int idx) { ...@@ -54,7 +54,7 @@ static int speex_header(AVFormatContext *s, int idx) {
return 0; return 0;
} }
ogg_codec_t speex_codec = { const ogg_codec_t speex_codec = {
.magic = "Speex ", .magic = "Speex ",
.magicsize = 8, .magicsize = 8,
.header = speex_header .header = speex_header
......
...@@ -130,7 +130,7 @@ theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp) ...@@ -130,7 +130,7 @@ theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp)
return iframe + pframe; return iframe + pframe;
} }
ogg_codec_t theora_codec = { const ogg_codec_t theora_codec = {
.magic = "\200theora", .magic = "\200theora",
.magicsize = 7, .magicsize = 7,
.header = theora_header, .header = theora_header,
......
...@@ -219,7 +219,7 @@ vorbis_header (AVFormatContext * s, int idx) ...@@ -219,7 +219,7 @@ vorbis_header (AVFormatContext * s, int idx)
return os->seq < 3; return os->seq < 3;
} }
ogg_codec_t vorbis_codec = { const ogg_codec_t vorbis_codec = {
.magic = "\001vorbis", .magic = "\001vorbis",
.magicsize = 7, .magicsize = 7,
.header = vorbis_header .header = vorbis_header
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment