summaryrefslogtreecommitdiff
path: root/libavformat/rl2.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/rl2.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/rl2.c')
-rw-r--r--libavformat/rl2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index d655d3e9f5..16e029f679 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -96,20 +96,20 @@ static av_cold int rl2_read_header(AVFormatContext *s,
int ret = 0;
url_fskip(pb,4); /* skip FORM tag */
- back_size = get_le32(pb); /**< get size of the background frame */
- signature = get_be32(pb);
- data_size = get_be32(pb);
- frame_count = get_le32(pb);
+ back_size = avio_rl32(pb); /**< get size of the background frame */
+ signature = avio_rb32(pb);
+ data_size = avio_rb32(pb);
+ frame_count = avio_rl32(pb);
/* disallow back_sizes and frame_counts that may lead to overflows later */
if(back_size > INT_MAX/2 || frame_count > INT_MAX / sizeof(uint32_t))
return AVERROR_INVALIDDATA;
- encoding_method = get_le16(pb);
- sound_rate = get_le16(pb);
- rate = get_le16(pb);
- channels = get_le16(pb);
- def_sound_size = get_le16(pb);
+ encoding_method = avio_rl16(pb);
+ sound_rate = avio_rl16(pb);
+ rate = avio_rl16(pb);
+ channels = avio_rl16(pb);
+ def_sound_size = avio_rl16(pb);
/** setup video stream */
st = av_new_stream(s, 0);
@@ -133,7 +133,7 @@ static av_cold int rl2_read_header(AVFormatContext *s,
if(!st->codec->extradata)
return AVERROR(ENOMEM);
- if(get_buffer(pb,st->codec->extradata,st->codec->extradata_size) !=
+ if(avio_read(pb,st->codec->extradata,st->codec->extradata_size) !=
st->codec->extradata_size)
return AVERROR(EIO);
@@ -173,11 +173,11 @@ static av_cold int rl2_read_header(AVFormatContext *s,
/** read offset and size tables */
for(i=0; i < frame_count;i++)
- chunk_size[i] = get_le32(pb);
+ chunk_size[i] = avio_rl32(pb);
for(i=0; i < frame_count;i++)
- chunk_offset[i] = get_le32(pb);
+ chunk_offset[i] = avio_rl32(pb);
for(i=0; i < frame_count;i++)
- audio_size[i] = get_le32(pb) & 0xFFFF;
+ audio_size[i] = avio_rl32(pb) & 0xFFFF;
/** build the sample index */
for(i=0;i<frame_count;i++){