aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-21 16:43:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-22 02:44:37 +0100
commite63a362857d9807b23e65872598d782fa53bb6af (patch)
tree7a21287e54bfbd2ec9c45bcb5a22e441e4992f2b /libavformat/tta.c
parent6a786b15c34765ec00be3cd808dafbb041fd5881 (diff)
downloadffmpeg-e63a362857d9807b23e65872598d782fa53bb6af.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> (cherry picked from commit b7effd4e8338f6ed5bda630ad7ed0809bf458648)
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 21b7538d26..61a41df90b 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -47,19 +47,19 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
ff_id3v1_read(s);
start_offset = url_ftell(s->pb);
- if (get_le32(s->pb) != AV_RL32("TTA1"))
+ if (avio_rl32(s->pb) != AV_RL32("TTA1"))
return -1; // not tta file
url_fskip(s->pb, 2); // FIXME: flags
- channels = get_le16(s->pb);
- bps = get_le16(s->pb);
- samplerate = get_le32(s->pb);
+ channels = avio_rl16(s->pb);
+ bps = avio_rl16(s->pb);
+ samplerate = avio_rl32(s->pb);
if(samplerate <= 0 || samplerate > 1000000){
av_log(s, AV_LOG_ERROR, "nonsense samplerate\n");
return -1;
}
- datalen = get_le32(s->pb);
+ datalen = avio_rl32(s->pb);
if(datalen < 0){
av_log(s, AV_LOG_ERROR, "nonsense datalen\n");
return -1;
@@ -87,7 +87,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
framepos = url_ftell(s->pb) + 4*c->totalframes + 4;
for (i = 0; i < c->totalframes; i++) {
- uint32_t size = get_le32(s->pb);
+ uint32_t size = avio_rl32(s->pb);
av_add_index_entry(st, framepos, i*framelen, size, 0, AVINDEX_KEYFRAME);
framepos += size;
}
@@ -101,13 +101,13 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->extradata_size = url_ftell(s->pb) - start_offset;
if(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
- //this check is redundant as get_buffer should fail
+ //this check is redundant as avio_read should fail
av_log(s, AV_LOG_ERROR, "extradata_size too large\n");
return -1;
}
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
url_fseek(s->pb, start_offset, SEEK_SET);
- get_buffer(s->pb, st->codec->extradata, st->codec->extradata_size);
+ avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);
return 0;
}