[MPlayer-cvslog] CVS: main/libvo vosub_vidix.c,1.64,1.65

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Dec 7 17:04:17 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv25132

Modified Files:
	vosub_vidix.c 
Log Message:
really clear frames to black instead of grey, and make sure one of those
cleared frames is actually shown (and not a leftover from last film, which
happened at least with ATI cards).


Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- vosub_vidix.c	28 Oct 2004 01:15:52 -0000	1.64
+++ vosub_vidix.c	7 Dec 2005 16:04:14 -0000	1.65
@@ -404,6 +404,7 @@
 		   unsigned dst_height,unsigned format,unsigned dest_bpp,
 		   unsigned vid_w,unsigned vid_h)
 {
+  void *tmp, *tmpa;
   size_t i;
   int err;
   uint32_t sstride,apitch;
@@ -495,14 +496,22 @@
 
 	vidix_mem = vidix_play.dga_addr;
 
-	/* select first frame */
-	next_frame = 0;
-//        vdlPlaybackFrameSelect(vidix_handler,next_frame);
-
+	tmp = calloc(image_width, image_height);
+	tmpa = malloc(image_width * image_height);
+	memset(tmpa, 1, image_width * image_height);
 	/* clear every frame with correct address and frame_size */
-	for (i = 0; i < vidix_play.num_frames; i++)
+	/* HACK: use draw_alpha to clear Y component */
+	for (i = 0; i < vidix_play.num_frames; i++) {
+	    next_frame = i;
 	    memset(vidix_mem + vidix_play.offsets[i], 0x80,
 		vidix_play.frame_size);
+	    draw_alpha(0, 0, image_width, image_height, tmp, tmpa, image_width);
+	}
+	free(tmp);
+	free(tmpa);
+	/* show one of the "clear" frames */
+	vidix_flip_page();
+
 	switch(format)
 	{
 	    case IMGFMT_YV12:




More information about the MPlayer-cvslog mailing list