summaryrefslogtreecommitdiff
path: root/libavformat/vocdec.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/vocdec.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/vocdec.c')
-rw-r--r--libavformat/vocdec.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 056a657ec2..01bbdb2c62 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -46,7 +46,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap)
AVStream *st;
url_fskip(pb, 20);
- header_size = get_le16(pb) - 22;
+ header_size = avio_rl16(pb) - 22;
if (header_size != 4) {
av_log(s, AV_LOG_ERROR, "unknown header size: %d\n", header_size);
return AVERROR(ENOSYS);
@@ -73,10 +73,10 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
int channels = 1;
while (!voc->remaining_size) {
- type = get_byte(pb);
+ type = avio_r8(pb);
if (type == VOC_TYPE_EOF)
return AVERROR(EIO);
- voc->remaining_size = get_le24(pb);
+ voc->remaining_size = avio_rl24(pb);
if (!voc->remaining_size) {
if (url_is_streamed(s->pb))
return AVERROR(EIO);
@@ -86,11 +86,11 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
switch (type) {
case VOC_TYPE_VOICE_DATA:
- dec->sample_rate = 1000000 / (256 - get_byte(pb));
+ dec->sample_rate = 1000000 / (256 - avio_r8(pb));
if (sample_rate)
dec->sample_rate = sample_rate;
dec->channels = channels;
- tmp_codec = get_byte(pb);
+ tmp_codec = avio_r8(pb);
dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id);
voc->remaining_size -= 2;
max_size -= 2;
@@ -101,19 +101,19 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
break;
case VOC_TYPE_EXTENDED:
- sample_rate = get_le16(pb);
- get_byte(pb);
- channels = get_byte(pb) + 1;
+ sample_rate = avio_rl16(pb);
+ avio_r8(pb);
+ channels = avio_r8(pb) + 1;
sample_rate = 256000000 / (channels * (65536 - sample_rate));
voc->remaining_size = 0;
max_size -= 4;
break;
case VOC_TYPE_NEW_VOICE_DATA:
- dec->sample_rate = get_le32(pb);
- dec->bits_per_coded_sample = get_byte(pb);
- dec->channels = get_byte(pb);
- tmp_codec = get_le16(pb);
+ dec->sample_rate = avio_rl32(pb);
+ dec->bits_per_coded_sample = avio_r8(pb);
+ dec->channels = avio_r8(pb);
+ tmp_codec = avio_rl16(pb);
url_fskip(pb, 4);
voc->remaining_size -= 12;
max_size -= 12;