summaryrefslogtreecommitdiff
path: root/libavformat/mvi.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/mvi.c
parent6a786b15c34765ec00be3cd808dafbb041fd5881 (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> (cherry picked from commit b7effd4e8338f6ed5bda630ad7ed0809bf458648)
Diffstat (limited to 'libavformat/mvi.c')
-rw-r--r--libavformat/mvi.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 053de15a5a..4784efae0d 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -53,20 +53,20 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
vst->codec->extradata_size = 2;
vst->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
- version = get_byte(pb);
- vst->codec->extradata[0] = get_byte(pb);
- vst->codec->extradata[1] = get_byte(pb);
- frames_count = get_le32(pb);
- msecs_per_frame = get_le32(pb);
- vst->codec->width = get_le16(pb);
- vst->codec->height = get_le16(pb);
- get_byte(pb);
- ast->codec->sample_rate = get_le16(pb);
- mvi->audio_data_size = get_le32(pb);
- get_byte(pb);
- player_version = get_le32(pb);
- get_le16(pb);
- get_byte(pb);
+ version = avio_r8(pb);
+ vst->codec->extradata[0] = avio_r8(pb);
+ vst->codec->extradata[1] = avio_r8(pb);
+ frames_count = avio_rl32(pb);
+ msecs_per_frame = avio_rl32(pb);
+ vst->codec->width = avio_rl16(pb);
+ vst->codec->height = avio_rl16(pb);
+ avio_r8(pb);
+ ast->codec->sample_rate = avio_rl16(pb);
+ mvi->audio_data_size = avio_rl32(pb);
+ avio_r8(pb);
+ player_version = avio_rl32(pb);
+ avio_rl16(pb);
+ avio_r8(pb);
if (frames_count == 0 || mvi->audio_data_size == 0)
return AVERROR_INVALIDDATA;
@@ -87,7 +87,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_MOTIONPIXELS;
- mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24;
+ mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? avio_rl16 : avio_rl24;
mvi->audio_frame_size = ((uint64_t)mvi->audio_data_size << MVI_FRAC_BITS) / frames_count;
mvi->audio_size_counter = (ast->codec->sample_rate * 830 / mvi->audio_frame_size - 1) * mvi->audio_frame_size;