radeon/uvd: fix MJPEG quantization table index
authorLeo Liu <leo.liu@amd.com>
Fri, 25 Aug 2017 17:17:40 +0000 (13:17 -0400)
committerLeo Liu <leo.liu@amd.com>
Sun, 3 Sep 2017 01:33:11 +0000 (21:33 -0400)
Fixes: 130d1f456b8 ("radeon/uvd: reconstruct MJPEG bitstream")
Signed-off-by: Leo Liu <leo.liu@amd.com>
src/gallium/drivers/radeon/radeon_uvd.c

index 648a493b59cdcbd551fc5335b0e1c4f34930c171..228f654af1b7538ed577335e0565be24c31ace1c 100644 (file)
@@ -969,7 +969,7 @@ static void get_mjpeg_slice_header(struct ruvd_decoder *dec, struct pipe_mjpeg_p
                        continue;
 
                buf[size++] = i;
-               memcpy((buf + size), &pic->quantization_table.quantiser_table, 64);
+               memcpy((buf + size), &pic->quantization_table.quantiser_table[i], 64);
                size += 64;
        }