openjpegdec: fix display artifacts for RGB 8-bit
authorAaron Boxer <boxerab@gmail.com>
Sat, 10 Jun 2017 11:56:48 +0000 (07:56 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 12 Jun 2017 06:54:44 +0000 (09:54 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=783626

ext/openjpeg/gstopenjpegdec.c

index 933c79d1ceee35c29b97882eb421da9812222653..881769b17b68512bff6729b8754c08ce575826b6 100644 (file)
@@ -307,14 +307,13 @@ fill_frame_packed8_3 (GstVideoFrame * frame, opj_image_t * image)
     tmp = data_out;
 
     for (x = 0; x < w; x++) {
-      tmp[1] = off[0] + *data_in[0];
-      tmp[2] = off[1] + *data_in[1];
-      tmp[3] = off[2] + *data_in[2];
-
-      tmp += 4;
+      tmp[0] = off[0] + *data_in[0];
+      tmp[1] = off[1] + *data_in[1];
+      tmp[2] = off[2] + *data_in[2];
       data_in[0]++;
       data_in[1]++;
       data_in[2]++;
+      tmp += 3;
     }
     data_out += dstride;
   }