summaryrefslogtreecommitdiff
path: root/libavformat/ivfenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-21 19:28:17 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-21 14:25:15 -0500
commit77eb5504d3b3e1047900382350e0bc5e0bfb16b5 (patch)
treeadb31feb8accd7dbaaa2ce1baf48fee96664abe1 /libavformat/ivfenc.c
parent78e2380a6d09e7a8b2a74d090abfb0a922e046f6 (diff)
avio: avio: avio_ prefixes for put_* functions
In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/ivfenc.c')
-rw-r--r--libavformat/ivfenc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c
index d7eed73e79..3913988144 100644
--- a/libavformat/ivfenc.c
+++ b/libavformat/ivfenc.c
@@ -34,15 +34,15 @@ static int ivf_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "Currently only VP8 is supported!\n");
return AVERROR(EINVAL);
}
- put_buffer(pb, "DKIF", 4);
- put_le16(pb, 0); // version
- put_le16(pb, 32); // header length
- put_le32(pb, ctx->codec_tag ? ctx->codec_tag : AV_RL32("VP80"));
- put_le16(pb, ctx->width);
- put_le16(pb, ctx->height);
- put_le32(pb, s->streams[0]->time_base.den);
- put_le32(pb, s->streams[0]->time_base.num);
- put_le64(pb, s->streams[0]->duration); // TODO: duration or number of frames?!?
+ avio_write(pb, "DKIF", 4);
+ avio_wl16(pb, 0); // version
+ avio_wl16(pb, 32); // header length
+ avio_wl32(pb, ctx->codec_tag ? ctx->codec_tag : AV_RL32("VP80"));
+ avio_wl16(pb, ctx->width);
+ avio_wl16(pb, ctx->height);
+ avio_wl32(pb, s->streams[0]->time_base.den);
+ avio_wl32(pb, s->streams[0]->time_base.num);
+ avio_wl64(pb, s->streams[0]->duration); // TODO: duration or number of frames?!?
return 0;
}
@@ -50,9 +50,9 @@ static int ivf_write_header(AVFormatContext *s)
static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVIOContext *pb = s->pb;
- put_le32(pb, pkt->size);
- put_le64(pb, pkt->pts);
- put_buffer(pb, pkt->data, pkt->size);
+ avio_wl32(pb, pkt->size);
+ avio_wl64(pb, pkt->pts);
+ avio_write(pb, pkt->data, pkt->size);
put_flush_packet(pb);
return 0;