aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avs.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-21 16:43:01 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-21 11:23:22 -0500
commitb7effd4e8338f6ed5bda630ad7ed0809bf458648 (patch)
tree53c878f6dd48c313a9bcde1855c2b4e009822c9e /libavformat/avs.c
parentf8bed30d8b176fa030f6737765338bb4a2bcabc9 (diff)
downloadffmpeg-b7effd4e8338f6ed5bda630ad7ed0809bf458648.tar.gz
avio: avio_ prefixes for get_* functions
In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/avs.c')
-rw-r--r--libavformat/avs.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 2e1b22439c..0ba5cebfdf 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -62,11 +62,11 @@ static int avs_read_header(AVFormatContext * s, AVFormatParameters * ap)
s->ctx_flags |= AVFMTCTX_NOHEADER;
url_fskip(s->pb, 4);
- avs->width = get_le16(s->pb);
- avs->height = get_le16(s->pb);
- avs->bits_per_sample = get_le16(s->pb);
- avs->fps = get_le16(s->pb);
- avs->nb_frames = get_le32(s->pb);
+ avs->width = avio_rl16(s->pb);
+ avs->height = avio_rl16(s->pb);
+ avs->bits_per_sample = avio_rl16(s->pb);
+ avs->fps = avio_rl16(s->pb);
+ avs->nb_frames = avio_rl32(s->pb);
avs->remaining_frame_size = 0;
avs->remaining_audio_size = 0;
@@ -104,7 +104,7 @@ avs_read_video_packet(AVFormatContext * s, AVPacket * pkt,
pkt->data[palette_size + 1] = type;
pkt->data[palette_size + 2] = size & 0xFF;
pkt->data[palette_size + 3] = (size >> 8) & 0xFF;
- ret = get_buffer(s->pb, pkt->data + palette_size + 4, size - 4) + 4;
+ ret = avio_read(s->pb, pkt->data + palette_size + 4, size - 4) + 4;
if (ret < size) {
av_free_packet(pkt);
return AVERROR(EIO);
@@ -154,20 +154,20 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
while (1) {
if (avs->remaining_frame_size <= 0) {
- if (!get_le16(s->pb)) /* found EOF */
+ if (!avio_rl16(s->pb)) /* found EOF */
return AVERROR(EIO);
- avs->remaining_frame_size = get_le16(s->pb) - 4;
+ avs->remaining_frame_size = avio_rl16(s->pb) - 4;
}
while (avs->remaining_frame_size > 0) {
- sub_type = get_byte(s->pb);
- type = get_byte(s->pb);
- size = get_le16(s->pb);
+ sub_type = avio_r8(s->pb);
+ type = avio_r8(s->pb);
+ size = avio_rl16(s->pb);
avs->remaining_frame_size -= size;
switch (type) {
case AVS_PALETTE:
- ret = get_buffer(s->pb, palette, size - 4);
+ ret = avio_read(s->pb, palette, size - 4);
if (ret < size - 4)
return AVERROR(EIO);
palette_size = size;