From b7effd4e8338f6ed5bda630ad7ed0809bf458648 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 21 Feb 2011 16:43:01 +0100 Subject: avio: avio_ prefixes for get_* functions In the name of consistency: get_byte -> avio_r8 get_ -> avio_r 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 --- libavformat/wc3movie.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libavformat/wc3movie.c') diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c index 4d9ab28e3b..478b46f913 100644 --- a/libavformat/wc3movie.c +++ b/libavformat/wc3movie.c @@ -105,8 +105,8 @@ static int wc3_read_header(AVFormatContext *s, /* traverse through the chunks and load the header information before * the first BRCH tag */ - fourcc_tag = get_le32(pb); - size = (get_be32(pb) + 1) & (~1); + fourcc_tag = avio_rl32(pb); + size = (avio_rb32(pb) + 1) & (~1); do { switch (fourcc_tag) { @@ -127,7 +127,7 @@ static int wc3_read_header(AVFormatContext *s, buffer = av_malloc(size+1); if (!buffer) return AVERROR(ENOMEM); - if ((ret = get_buffer(pb, buffer, size)) != size) + if ((ret = avio_read(pb, buffer, size)) != size) return AVERROR(EIO); buffer[size] = 0; av_metadata_set2(&s->metadata, "title", buffer, @@ -136,8 +136,8 @@ static int wc3_read_header(AVFormatContext *s, case SIZE_TAG: /* video resolution override */ - wc3->width = get_le32(pb); - wc3->height = get_le32(pb); + wc3->width = avio_rl32(pb); + wc3->height = avio_rl32(pb); break; case PALT_TAG: @@ -154,9 +154,9 @@ static int wc3_read_header(AVFormatContext *s, break; } - fourcc_tag = get_le32(pb); + fourcc_tag = avio_rl32(pb); /* chunk sizes are 16-bit aligned */ - size = (get_be32(pb) + 1) & (~1); + size = (avio_rb32(pb) + 1) & (~1); if (url_feof(pb)) return AVERROR(EIO); @@ -205,9 +205,9 @@ static int wc3_read_packet(AVFormatContext *s, while (!packet_read) { - fourcc_tag = get_le32(pb); + fourcc_tag = avio_rl32(pb); /* chunk sizes are 16-bit aligned */ - size = (get_be32(pb) + 1) & (~1); + size = (avio_rb32(pb) + 1) & (~1); if (url_feof(pb)) return AVERROR(EIO); @@ -242,7 +242,7 @@ static int wc3_read_packet(AVFormatContext *s, #if 0 url_fseek(pb, size, SEEK_CUR); #else - if ((unsigned)size > sizeof(text) || (ret = get_buffer(pb, text, size)) != size) + if ((unsigned)size > sizeof(text) || (ret = avio_read(pb, text, size)) != size) ret = AVERROR(EIO); else { int i = 0; -- cgit v1.2.3