From 0570bf06d45ae3e5c73cb0b32b2101e2668f91e9 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 11 Nov 2002 09:20:53 +0000 Subject: [PATCH] * cleanup statics & const Originally committed as revision 1188 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libav/asf.c | 8 ++++---- libav/avienc.c | 8 ++++---- libav/avio.h | 2 +- libav/aviobuf.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libav/asf.c b/libav/asf.c index 4f82e65fa1..892d863c6f 100644 --- a/libav/asf.c +++ b/libav/asf.c @@ -874,7 +874,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec.extradata = av_mallocz(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); } pos2 = url_ftell(pb); @@ -1202,7 +1202,7 @@ static int asf_read_seek(AVFormatContext *s, int64_t pts) return -1; } -AVInputFormat asf_iformat = { +static AVInputFormat asf_iformat = { "asf", "asf format", sizeof(ASFContext), @@ -1213,7 +1213,7 @@ AVInputFormat asf_iformat = { asf_read_seek, }; -AVOutputFormat asf_oformat = { +static AVOutputFormat asf_oformat = { "asf", "asf format", "application/octet-stream", @@ -1230,7 +1230,7 @@ AVOutputFormat asf_oformat = { asf_write_trailer, }; -AVOutputFormat asf_stream_oformat = { +static AVOutputFormat asf_stream_oformat = { "asf_stream", "asf format", "application/octet-stream", diff --git a/libav/avienc.c b/libav/avienc.c index 27c8ac753f..2270f8453e 100644 --- a/libav/avienc.c +++ b/libav/avienc.c @@ -36,7 +36,7 @@ typedef struct { AVIIndex *first, *last; } AVIContext; -offset_t start_tag(ByteIOContext *pb, char *tag) +offset_t start_tag(ByteIOContext *pb, const char *tag) { put_tag(pb, tag); 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 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_H263P, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */ @@ -122,7 +122,7 @@ unsigned int codec_get_bmp_tag(int id) } /* 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, enc->width); @@ -138,7 +138,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, CodecTag *tags, int 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) { case CODEC_ID_PCM_S16LE: diff --git a/libav/avio.h b/libav/avio.h index bf00f2edd1..541eff5ae0 100644 --- a/libav/avio.h +++ b/libav/avio.h @@ -85,7 +85,7 @@ void put_le32(ByteIOContext *s, unsigned int val); void put_be32(ByteIOContext *s, unsigned int val); void put_le16(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_strz(ByteIOContext *s, const char *buf); diff --git a/libav/aviobuf.c b/libav/aviobuf.c index 27f6b5d38a..2e931bd849 100644 --- a/libav/aviobuf.c +++ b/libav/aviobuf.c @@ -219,7 +219,7 @@ void put_be16(ByteIOContext *s, unsigned int val) put_byte(s, val); } -void put_tag(ByteIOContext *s, char *tag) +void put_tag(ByteIOContext *s, const char *tag) { while (*tag) { put_byte(s, *tag++);