aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/vc1testenc.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/vc1testenc.c
parent78e2380a6d09e7a8b2a74d090abfb0a922e046f6 (diff)
downloadffmpeg-77eb5504d3b3e1047900382350e0bc5e0bfb16b5.tar.gz
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/vc1testenc.c')
-rw-r--r--libavformat/vc1testenc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 865a157dac..65889fc55c 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -33,20 +33,20 @@ static int vc1test_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");
return -1;
}
- put_le24(pb, 0); //frames count will be here
- put_byte(pb, 0xC5);
- put_le32(pb, 4);
- put_buffer(pb, avc->extradata, 4);
- put_le32(pb, avc->height);
- put_le32(pb, avc->width);
- put_le32(pb, 0xC);
- put_le24(pb, 0); // hrd_buffer
- put_byte(pb, 0x80); // level|cbr|res1
- put_le32(pb, 0); // hrd_rate
+ avio_wl24(pb, 0); //frames count will be here
+ avio_w8(pb, 0xC5);
+ avio_wl32(pb, 4);
+ avio_write(pb, avc->extradata, 4);
+ avio_wl32(pb, avc->height);
+ avio_wl32(pb, avc->width);
+ avio_wl32(pb, 0xC);
+ avio_wl24(pb, 0); // hrd_buffer
+ avio_w8(pb, 0x80); // level|cbr|res1
+ avio_wl32(pb, 0); // hrd_rate
if (s->streams[0]->r_frame_rate.den && s->streams[0]->r_frame_rate.num == 1)
- put_le32(pb, s->streams[0]->r_frame_rate.den);
+ avio_wl32(pb, s->streams[0]->r_frame_rate.den);
else
- put_le32(pb, 0xFFFFFFFF); //variable framerate
+ avio_wl32(pb, 0xFFFFFFFF); //variable framerate
av_set_pts_info(s->streams[0], 32, 1, 1000);
return 0;
@@ -59,9 +59,9 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
if (!pkt->size)
return 0;
- put_le32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
- put_le32(pb, pkt->pts);
- put_buffer(pb, pkt->data, pkt->size);
+ avio_wl32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
+ avio_wl32(pb, pkt->pts);
+ avio_write(pb, pkt->data, pkt->size);
put_flush_packet(pb);
ctx->frames++;
@@ -75,7 +75,7 @@ static int vc1test_write_trailer(AVFormatContext *s)
if (!url_is_streamed(s->pb)) {
url_fseek(pb, 0, SEEK_SET);
- put_le24(pb, ctx->frames);
+ avio_wl24(pb, ctx->frames);
put_flush_packet(pb);
}
return 0;