aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/westwood.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/westwood.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/westwood.c')
-rw-r--r--libavformat/westwood.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index 7666bd80b3..b923fef79c 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -130,7 +130,7 @@ static int wsaud_read_header(AVFormatContext *s,
AVStream *st;
unsigned char header[AUD_HEADER_SIZE];
- if (get_buffer(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE)
+ if (avio_read(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE)
return AVERROR(EIO);
wsaud->audio_samplerate = AV_RL16(&header[0]);
if (header[11] == 99)
@@ -173,7 +173,7 @@ static int wsaud_read_packet(AVFormatContext *s,
unsigned int chunk_size;
int ret = 0;
- if (get_buffer(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) !=
+ if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) !=
AUD_CHUNK_PREAMBLE_SIZE)
return AVERROR(EIO);
@@ -237,7 +237,7 @@ static int wsvqa_read_header(AVFormatContext *s,
st->codec->extradata_size = VQA_HEADER_SIZE;
st->codec->extradata = av_mallocz(VQA_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
header = (unsigned char *)st->codec->extradata;
- if (get_buffer(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
+ if (avio_read(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
VQA_HEADER_SIZE) {
av_free(st->codec->extradata);
return AVERROR(EIO);
@@ -277,7 +277,7 @@ static int wsvqa_read_header(AVFormatContext *s,
/* there are 0 or more chunks before the FINF chunk; iterate until
* FINF has been skipped and the file will be ready to be demuxed */
do {
- if (get_buffer(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
+ if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
av_free(st->codec->extradata);
return AVERROR(EIO);
}
@@ -320,7 +320,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
unsigned int chunk_size;
int skip_byte;
- while (get_buffer(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
+ while (avio_read(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
chunk_type = AV_RB32(&preamble[0]);
chunk_size = AV_RB32(&preamble[4]);
skip_byte = chunk_size & 0x01;
@@ -329,7 +329,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
if (av_new_packet(pkt, chunk_size))
return AVERROR(EIO);
- ret = get_buffer(pb, pkt->data, chunk_size);
+ ret = avio_read(pb, pkt->data, chunk_size);
if (ret != chunk_size) {
av_free_packet(pkt);
return AVERROR(EIO);