* cleanup statics & const

Originally committed as revision 1188 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Zdenek Kabelac 22 years ago
parent e8c0008912
commit 0570bf06d4
  1. 8
      libav/asf.c
  2. 8
      libav/avienc.c
  3. 2
      libav/avio.h
  4. 2
      libav/aviobuf.c

@ -874,7 +874,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec.extradata = av_mallocz(st->codec.extradata_size); st->codec.extradata = av_mallocz(st->codec.extradata_size);
get_buffer(pb, st->codec.extradata, st->codec.extradata_size); get_buffer(pb, st->codec.extradata, st->codec.extradata_size);
} }
st->codec.codec_tag = tag1; st->codec.codec_tag = st->codec.fourcc = tag1;
st->codec.codec_id = codec_get_id(codec_bmp_tags, tag1); st->codec.codec_id = codec_get_id(codec_bmp_tags, tag1);
} }
pos2 = url_ftell(pb); pos2 = url_ftell(pb);
@ -1202,7 +1202,7 @@ static int asf_read_seek(AVFormatContext *s, int64_t pts)
return -1; return -1;
} }
AVInputFormat asf_iformat = { static AVInputFormat asf_iformat = {
"asf", "asf",
"asf format", "asf format",
sizeof(ASFContext), sizeof(ASFContext),
@ -1213,7 +1213,7 @@ AVInputFormat asf_iformat = {
asf_read_seek, asf_read_seek,
}; };
AVOutputFormat asf_oformat = { static AVOutputFormat asf_oformat = {
"asf", "asf",
"asf format", "asf format",
"application/octet-stream", "application/octet-stream",
@ -1230,7 +1230,7 @@ AVOutputFormat asf_oformat = {
asf_write_trailer, asf_write_trailer,
}; };
AVOutputFormat asf_stream_oformat = { static AVOutputFormat asf_stream_oformat = {
"asf_stream", "asf_stream",
"asf format", "asf format",
"application/octet-stream", "application/octet-stream",

@ -36,7 +36,7 @@ typedef struct {
AVIIndex *first, *last; AVIIndex *first, *last;
} AVIContext; } AVIContext;
offset_t start_tag(ByteIOContext *pb, char *tag) offset_t start_tag(ByteIOContext *pb, const char *tag)
{ {
put_tag(pb, tag); put_tag(pb, tag);
put_le32(pb, 0); put_le32(pb, 0);
@ -55,7 +55,7 @@ void end_tag(ByteIOContext *pb, offset_t start)
/* Note: when encoding, the first matching tag is used, so order is /* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */ important if multiple tags possible for a given codec. */
CodecTag codec_bmp_tags[] = { const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_H263, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
{ CODEC_ID_H263P, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
{ CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */ { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
@ -122,7 +122,7 @@ unsigned int codec_get_bmp_tag(int id)
} }
/* BITMAPINFOHEADER header */ /* BITMAPINFOHEADER header */
void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, CodecTag *tags, int for_asf) void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
{ {
put_le32(pb, 40); /* size */ put_le32(pb, 40); /* size */
put_le32(pb, enc->width); put_le32(pb, enc->width);
@ -138,7 +138,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, CodecTag *tags, int
put_le32(pb, 0); put_le32(pb, 0);
} }
void parse_specific_params(AVCodecContext *stream, int *au_byterate, int *au_ssize, int *au_scale) static void parse_specific_params(AVCodecContext *stream, int *au_byterate, int *au_ssize, int *au_scale)
{ {
switch(stream->codec_id) { switch(stream->codec_id) {
case CODEC_ID_PCM_S16LE: case CODEC_ID_PCM_S16LE:

@ -85,7 +85,7 @@ void put_le32(ByteIOContext *s, unsigned int val);
void put_be32(ByteIOContext *s, unsigned int val); void put_be32(ByteIOContext *s, unsigned int val);
void put_le16(ByteIOContext *s, unsigned int val); void put_le16(ByteIOContext *s, unsigned int val);
void put_be16(ByteIOContext *s, unsigned int val); void put_be16(ByteIOContext *s, unsigned int val);
void put_tag(ByteIOContext *s, char *tag); void put_tag(ByteIOContext *s, const char *tag);
void put_be64_double(ByteIOContext *s, double val); void put_be64_double(ByteIOContext *s, double val);
void put_strz(ByteIOContext *s, const char *buf); void put_strz(ByteIOContext *s, const char *buf);

@ -219,7 +219,7 @@ void put_be16(ByteIOContext *s, unsigned int val)
put_byte(s, val); put_byte(s, val);
} }
void put_tag(ByteIOContext *s, char *tag) void put_tag(ByteIOContext *s, const char *tag)
{ {
while (*tag) { while (*tag) {
put_byte(s, *tag++); put_byte(s, *tag++);

Loading…
Cancel
Save