aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/exr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-07-07 14:41:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-07-07 14:53:01 +0200
commitb450b82514e9eaf5bc59759e814bfc2b8e2d864d (patch)
tree5c9058fb1cfc62b270487a92428163bfd4178ff4 /libavcodec/exr.c
parent50747d6b1f25a2d1feafb5e413c7e22bad4c450c (diff)
downloadffmpeg-b450b82514e9eaf5bc59759e814bfc2b8e2d864d.tar.gz
avcodec/exr: Fix mixed declarations and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/exr.c')
-rw-r--r--libavcodec/exr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index e226fd777d..6960a290f8 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1195,8 +1195,9 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
} else {
for (x = 0; x < td->xsize; x++) {
union av_intfloat32 t;
+ int c;
- for (int c = 0; c < rgb_channel_count; c++) {
+ for (c = 0; c < rgb_channel_count; c++) {
t.i = bytestream_get_le32(&rgb[c]);
if (t.f > 0.0f) /* avoid negative values */
t.f = powf(t.f, one_gamma);
@@ -1210,7 +1211,8 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
} else {
// 16-bit
for (x = 0; x < td->xsize; x++) {
- for (int c = 0; c < rgb_channel_count; c++) {
+ int c;
+ for (c = 0; c < rgb_channel_count; c++) {
*ptr_x++ = s->gamma_table[bytestream_get_le16(&rgb[c])];
}