From 77eb5504d3b3e1047900382350e0bc5e0bfb16b5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 21 Feb 2011 19:28:17 +0100 Subject: avio: avio: avio_ prefixes for put_* functions In the name of consistency: put_byte -> avio_w8 put_ -> avio_w 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 --- libavformat/ivfenc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libavformat/ivfenc.c') 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; -- cgit v1.2.3