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);
return -1;
}
-AVInputFormat asf_iformat = {
+static AVInputFormat asf_iformat = {
"asf",
"asf format",
sizeof(ASFContext),
asf_read_seek,
};
-AVOutputFormat asf_oformat = {
+static AVOutputFormat asf_oformat = {
"asf",
"asf format",
"application/octet-stream",
asf_write_trailer,
};
-AVOutputFormat asf_stream_oformat = {
+static AVOutputFormat asf_stream_oformat = {
"asf_stream",
"asf format",
"application/octet-stream",
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);
/* 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 */
}
/* 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);
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:
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);