Fix avifRGBImageComputeGainMap() colorspaceinfo (#1882)
diff --git a/src/gainmap.c b/src/gainmap.c
index 98636b5..cf45a62 100644
--- a/src/gainmap.c
+++ b/src/gainmap.c
@@ -581,7 +581,7 @@
float channelMin[3] = { 0 };
for (int j = 0; j < height; ++j) {
for (int i = 0; i < width; ++i) {
- avifGetRGBAPixel(useBaseColorSpace ? altRgbImage : baseRgbImage, i, j, &baseRGBInfo, rgba);
+ avifGetRGBAPixel(useBaseColorSpace ? altRgbImage : baseRgbImage, i, j, useBaseColorSpace ? &altRGBInfo : &baseRGBInfo, rgba);
// Convert to linear.
for (int c = 0; c < 3; ++c) {