[Mplayer-cvslog] CVS: main/libvo vo_png.c,1.6,1.7

Arpi of Ize arpi at mplayer.dev.hu
Wed Jan 2 18:50:06 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv28830

Modified Files:
	vo_png.c 
Log Message:
osd support, zlib range fix. by Kim Minh Kaplan <kmkaplan at selfoffice.com>

Index: vo_png.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_png.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vo_png.c	6 Nov 2001 11:21:08 -0000	1.6
+++ vo_png.c	2 Jan 2002 17:50:03 -0000	1.7
@@ -56,6 +56,10 @@
 	enum {OK,ERROR} status;  
 };
 	
+static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
+    vo_draw_alpha_rgb24(w, h, src, srca, stride, image_data + 3 * (y0 * image_width + x0), 3 * image_width);
+}
+
 static uint32_t
 init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
 {
@@ -84,7 +88,7 @@
 	     return 1;     
     }		
     
-    if((z_compression < 0) || (z_compression < 9)) {
+    if((z_compression >= 0) && (z_compression <= 9)) {
 	    if(z_compression == 0) {
 		    printf("PNG Warning: compression level set to 0, compression disabled!\n");
 		    printf("PNG Info: Use the -z <n> switch to set compression level from 0 to 9.\n");
@@ -223,6 +227,7 @@
 
 static void draw_osd(void)
 {
+    vo_draw_text(image_width, image_height, draw_alpha);
 }
 
 static void flip_page (void)




More information about the MPlayer-cvslog mailing list