aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rl2.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/rl2.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/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++){