Mercurial > libavformat.hg
diff wc3movie.c @ 1673:a782462e2497 libavformat
rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author | alex |
---|---|
date | Fri, 19 Jan 2007 22:12:59 +0000 |
parents | 0899bfe4105c |
children | 2f0154760e5f |
line wrap: on
line diff
--- a/wc3movie.c Thu Jan 18 23:23:41 2007 +0000 +++ b/wc3movie.c Fri Jan 19 22:12:59 2007 +0000 @@ -115,8 +115,8 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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;