summaryrefslogtreecommitdiff
path: root/libavformat/wc3movie.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/wc3movie.c')
-rw-r--r--libavformat/wc3movie.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 6b32427978..3e58a1bbae 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -115,8 +115,8 @@ static int wc3_probe(AVProbeData *p)
if (p->buf_size < 12)
return 0;
- if ((LE_32(&p->buf[0]) != FORM_TAG) ||
- (LE_32(&p->buf[8]) != MOVE_TAG))
+ if ((AV_RL32(&p->buf[0]) != FORM_TAG) ||
+ (AV_RL32(&p->buf[8]) != MOVE_TAG))
return 0;
return AVPROBE_SCORE_MAX;
@@ -153,8 +153,8 @@ static int wc3_read_header(AVFormatContext *s,
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
return AVERROR_IO;
- fourcc_tag = LE_32(&preamble[0]);
- size = (BE_32(&preamble[4]) + 1) & (~1);
+ fourcc_tag = AV_RL32(&preamble[0]);
+ size = (AV_RB32(&preamble[4]) + 1) & (~1);
do {
switch (fourcc_tag) {
@@ -170,7 +170,7 @@ static int wc3_read_header(AVFormatContext *s,
url_fseek(pb, 8, SEEK_CUR);
if ((ret = get_buffer(pb, preamble, 4)) != 4)
return AVERROR_IO;
- wc3->palette_count = LE_32(&preamble[0]);
+ wc3->palette_count = AV_RL32(&preamble[0]);
if((unsigned)wc3->palette_count >= UINT_MAX / PALETTE_SIZE){
wc3->palette_count= 0;
return -1;
@@ -193,8 +193,8 @@ static int wc3_read_header(AVFormatContext *s,
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
return AVERROR_IO;
- wc3->width = LE_32(&preamble[0]);
- wc3->height = LE_32(&preamble[4]);
+ wc3->width = AV_RL32(&preamble[0]);
+ wc3->height = AV_RL32(&preamble[4]);
break;
case PALT_TAG:
@@ -229,9 +229,9 @@ static int wc3_read_header(AVFormatContext *s,
if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
WC3_PREAMBLE_SIZE)
return AVERROR_IO;
- fourcc_tag = LE_32(&preamble[0]);
+ fourcc_tag = AV_RL32(&preamble[0]);
/* chunk sizes are 16-bit aligned */
- size = (BE_32(&preamble[4]) + 1) & (~1);
+ size = (AV_RB32(&preamble[4]) + 1) & (~1);
} while (fourcc_tag != BRCH_TAG);
@@ -291,9 +291,9 @@ static int wc3_read_packet(AVFormatContext *s,
WC3_PREAMBLE_SIZE)
ret = AVERROR_IO;
- fourcc_tag = LE_32(&preamble[0]);
+ fourcc_tag = AV_RL32(&preamble[0]);
/* chunk sizes are 16-bit aligned */
- size = (BE_32(&preamble[4]) + 1) & (~1);
+ size = (AV_RB32(&preamble[4]) + 1) & (~1);
switch (fourcc_tag) {
@@ -305,7 +305,7 @@ static int wc3_read_packet(AVFormatContext *s,
/* load up new palette */
if ((ret = get_buffer(pb, preamble, 4)) != 4)
return AVERROR_IO;
- palette_number = LE_32(&preamble[0]);
+ palette_number = AV_RL32(&preamble[0]);
if (palette_number >= wc3->palette_count)
return AVERROR_INVALIDDATA;
base_palette_index = palette_number * PALETTE_COUNT * 3;