summaryrefslogtreecommitdiff
path: root/libavformat/c93.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/c93.c
parentf8bed30d8b176fa030f6737765338bb4a2bcabc9 (diff)
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/c93.c')
-rw-r--r--libavformat/c93.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/c93.c b/libavformat/c93.c
index 2beaebc356..3e3cd9cb0f 100644
--- a/libavformat/c93.c
+++ b/libavformat/c93.c
@@ -66,9 +66,9 @@ static int read_header(AVFormatContext *s,
int framecount = 0;
for (i = 0; i < 512; i++) {
- c93->block_records[i].index = get_le16(pb);
- c93->block_records[i].length = get_byte(pb);
- c93->block_records[i].frames = get_byte(pb);
+ c93->block_records[i].index = avio_rl16(pb);
+ c93->block_records[i].length = avio_r8(pb);
+ c93->block_records[i].frames = avio_r8(pb);
if (c93->block_records[i].frames > 32) {
av_log(s, AV_LOG_ERROR, "too many frames in block\n");
return AVERROR_INVALIDDATA;
@@ -114,7 +114,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if (c93->next_pkt_is_audio) {
c93->current_frame++;
c93->next_pkt_is_audio = 0;
- datasize = get_le16(pb);
+ datasize = avio_rl16(pb);
if (datasize > 42) {
if (!c93->audio) {
c93->audio = av_new_stream(s, 1);
@@ -142,13 +142,13 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if (c93->current_frame == 0) {
url_fseek(pb, br->index * 2048, SEEK_SET);
for (i = 0; i < 32; i++) {
- c93->frame_offsets[i] = get_le32(pb);
+ c93->frame_offsets[i] = avio_rl32(pb);
}
}
url_fseek(pb,br->index * 2048 +
c93->frame_offsets[c93->current_frame], SEEK_SET);
- datasize = get_le16(pb); /* video frame size */
+ datasize = avio_rl16(pb); /* video frame size */
ret = av_new_packet(pkt, datasize + 768 + 1);
if (ret < 0)
@@ -156,13 +156,13 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->data[0] = 0;
pkt->size = datasize + 1;
- ret = get_buffer(pb, pkt->data + 1, datasize);
+ ret = avio_read(pb, pkt->data + 1, datasize);
if (ret < datasize) {
ret = AVERROR(EIO);
goto fail;
}
- datasize = get_le16(pb); /* palette size */
+ datasize = avio_rl16(pb); /* palette size */
if (datasize) {
if (datasize != 768) {
av_log(s, AV_LOG_ERROR, "invalid palette size %u\n", datasize);
@@ -170,7 +170,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
goto fail;
}
pkt->data[0] |= C93_HAS_PALETTE;
- ret = get_buffer(pb, pkt->data + pkt->size, datasize);
+ ret = avio_read(pb, pkt->data + pkt->size, datasize);
if (ret < datasize) {
ret = AVERROR(EIO);
goto fail;