summaryrefslogtreecommitdiff
path: root/libavformat/ipmovie.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/ipmovie.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/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 6015b99b3b..6514397a1e 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -166,7 +166,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
url_fseek(pb, s->decode_map_chunk_offset, SEEK_SET);
s->decode_map_chunk_offset = 0;
- if (get_buffer(pb, pkt->data, s->decode_map_chunk_size) !=
+ if (avio_read(pb, pkt->data, s->decode_map_chunk_size) !=
s->decode_map_chunk_size) {
av_free_packet(pkt);
return CHUNK_EOF;
@@ -175,7 +175,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
url_fseek(pb, s->video_chunk_offset, SEEK_SET);
s->video_chunk_offset = 0;
- if (get_buffer(pb, pkt->data + s->decode_map_chunk_size,
+ if (avio_read(pb, pkt->data + s->decode_map_chunk_size,
s->video_chunk_size) != s->video_chunk_size) {
av_free_packet(pkt);
return CHUNK_EOF;
@@ -227,7 +227,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
/* read the next chunk, wherever the file happens to be pointing */
if (url_feof(pb))
return CHUNK_EOF;
- if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
+ if (avio_read(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
CHUNK_PREAMBLE_SIZE)
return CHUNK_BAD;
chunk_size = AV_RL16(&chunk_preamble[0]);
@@ -275,7 +275,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type = CHUNK_EOF;
break;
}
- if (get_buffer(pb, opcode_preamble, CHUNK_PREAMBLE_SIZE) !=
+ if (avio_read(pb, opcode_preamble, CHUNK_PREAMBLE_SIZE) !=
CHUNK_PREAMBLE_SIZE) {
chunk_type = CHUNK_BAD;
break;
@@ -314,7 +314,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type = CHUNK_BAD;
break;
}
- if (get_buffer(pb, scratch, opcode_size) !=
+ if (avio_read(pb, scratch, opcode_size) !=
opcode_size) {
chunk_type = CHUNK_BAD;
break;
@@ -331,7 +331,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type = CHUNK_BAD;
break;
}
- if (get_buffer(pb, scratch, opcode_size) !=
+ if (avio_read(pb, scratch, opcode_size) !=
opcode_size) {
chunk_type = CHUNK_BAD;
break;
@@ -369,7 +369,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type = CHUNK_BAD;
break;
}
- if (get_buffer(pb, scratch, opcode_size) !=
+ if (avio_read(pb, scratch, opcode_size) !=
opcode_size) {
chunk_type = CHUNK_BAD;
break;
@@ -434,7 +434,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type = CHUNK_BAD;
break;
}
- if (get_buffer(pb, scratch, opcode_size) != opcode_size) {
+ if (avio_read(pb, scratch, opcode_size) != opcode_size) {
chunk_type = CHUNK_BAD;
break;
}
@@ -528,10 +528,10 @@ static int ipmovie_read_header(AVFormatContext *s,
int chunk_type;
uint8_t signature_buffer[sizeof(signature)];
- get_buffer(pb, signature_buffer, sizeof(signature_buffer));
+ avio_read(pb, signature_buffer, sizeof(signature_buffer));
while (memcmp(signature_buffer, signature, sizeof(signature))) {
memmove(signature_buffer, signature_buffer + 1, sizeof(signature_buffer) - 1);
- signature_buffer[sizeof(signature_buffer) - 1] = get_byte(pb);
+ signature_buffer[sizeof(signature_buffer) - 1] = avio_r8(pb);
if (url_feof(pb))
return AVERROR_EOF;
}
@@ -549,7 +549,7 @@ static int ipmovie_read_header(AVFormatContext *s,
/* peek ahead to the next chunk-- if it is an init audio chunk, process
* it; if it is the first video chunk, this is a silent file */
- if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
+ if (avio_read(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
CHUNK_PREAMBLE_SIZE)
return AVERROR(EIO);
chunk_type = AV_RL16(&chunk_preamble[2]);