changeset 36513:fe7d63062afb

vo_bl: consistently multiply by "channels". Currently makes no difference since it is always 1.
author reimar
date Sat, 18 Jan 2014 14:04:31 +0000
parents 8057935cd9e0
children 855d2d796453
files libvo/vo_bl.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_bl.c	Sat Jan 18 13:59:00 2014 +0000
+++ b/libvo/vo_bl.c	Sat Jan 18 14:04:31 2014 +0000
@@ -155,8 +155,8 @@
 	fprintf(f->fp, "    <frame duration=\"%d\">\n", duration);
 	for (j = 0; j < bl->height; j++) {
 		fprintf(f->fp, "        <row>");
-		for (k = 0; k < bl->width; k++)
-			fprintf(f->fp, "%02x", *(i + j * bl->width + k));
+		for (k = 0; k < bl->width * bl->channels; k++)
+			fprintf(f->fp, "%02x", *(i + j * bl->width * bl->channels + k));
 		fprintf(f->fp, "</row>\n");
 	}
 	fprintf(f->fp, "    </frame>\n");
@@ -335,7 +335,8 @@
 }
 
 static uint32_t draw_image(mp_image_t *mpi) {
-    memcpy_pic(image, mpi->planes[0], mpi->w, mpi->h, bl->width, mpi->stride[0]);
+    memcpy_pic(image, mpi->planes[0], mpi->w * bl->channels, mpi->h,
+               bl->width * bl->channels, mpi->stride[0]);
     return VO_TRUE;
 }