aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dxv.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-08-01 09:04:33 +0300
committerMartin Storsjö <martin@martin.st>2016-08-02 21:18:12 +0300
commit9806b9ab5c7fb2ac5efd8ffa8713fea0c5fd218d (patch)
treef7fe4d7bb8f95a5fdf8aeefee4bf9eda31d05355 /libavcodec/dxv.c
parentf79d847400d218cfd0b95f10358fe6e65ec3c9c4 (diff)
downloadffmpeg-9806b9ab5c7fb2ac5efd8ffa8713fea0c5fd218d.tar.gz
Revert "Don't use expressions with side effects in macro parameters"
This reverts commit 25bacd0a0c32ae682e6f411b1ac9020aeaabca72. Since 230b1c070, the bytewise AV_W*() macros only expand their argument once, so revert to the more readable version of these. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/dxv.c')
-rw-r--r--libavcodec/dxv.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 39b297a235..99327dface 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -121,10 +121,8 @@ static int dxv_decompress_dxt1(AVCodecContext *avctx)
int pos = 2;
/* Copy the first two elements */
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data, value);
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data + 4, value);
+ AV_WL32(ctx->tex_data, bytestream2_get_le32(gbc));
+ AV_WL32(ctx->tex_data + 4, bytestream2_get_le32(gbc));
/* Process input until the whole texture has been filled */
while (pos + 2 <= ctx->tex_size / 4) {
@@ -174,14 +172,10 @@ static int dxv_decompress_dxt5(AVCodecContext *avctx)
int probe, check;
/* Copy the first four elements */
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data + 0, value);
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data + 4, value);
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data + 8, value);
- value = bytestream2_get_le32(gbc);
- AV_WL32(ctx->tex_data + 12, value);
+ AV_WL32(ctx->tex_data + 0, bytestream2_get_le32(gbc));
+ AV_WL32(ctx->tex_data + 4, bytestream2_get_le32(gbc));
+ AV_WL32(ctx->tex_data + 8, bytestream2_get_le32(gbc));
+ AV_WL32(ctx->tex_data + 12, bytestream2_get_le32(gbc));
/* Process input until the whole texture has been filled */
while (pos + 2 <= ctx->tex_size / 4) {