[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.5,1.6

Szabolcs Berecz szabii at users.sourceforge.net
Thu Mar 29 16:20:03 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv8500

Modified Files:
	vo_fbdev.c 
Log Message:
clear the frame on uninit

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** vo_fbdev.c	2001/03/29 13:58:54	1.5
--- vo_fbdev.c	2001/03/29 14:20:01	1.6
***************
*** 38,41 ****
--- 38,43 ----
  struct fb_fix_screeninfo fb_fix_info;
  struct fb_var_screeninfo fb_var_info;
+ static uint32_t fb_xres_virtual;
+ static uint32_t fb_yres_virtual;
  
  static int in_width;
***************
*** 120,123 ****
--- 122,127 ----
  
  	/* disable scrolling */
+ 	fb_xres_virtual = fb_var_info.xres_virtual;
+ 	fb_yres_virtual = fb_var_info.yres_virtual;
  	fb_var_info.xres_virtual = fb_var_info.xres;
  	fb_var_info.yres_virtual = fb_var_info.yres;
***************
*** 311,320 ****
  }
  
! static void flip_page(void)
  {
  	int i, out_offset = 0, in_offset = 0;
  
- 	vo_draw_text(in_width, in_height, draw_alpha);
- 	check_events();
  	for (i = 0; i < in_height; i++) {
  		memcpy(frame_buffer + out_offset, next_frame + in_offset,
--- 315,322 ----
  }
  
! static void put_frame(void)
  {
  	int i, out_offset = 0, in_offset = 0;
  
  	for (i = 0; i < in_height; i++) {
  		memcpy(frame_buffer + out_offset, next_frame + in_offset,
***************
*** 325,333 ****
  }
  
  static void uninit(void)
  {
  	if (vt_active >= 0)
  		ioctl(vt_fd, VT_ACTIVATE, vt_active);
- 	printf("vo_fbdev: uninit\n");
  	free(next_frame);
  	munmap(frame_buffer, fb_size);
--- 327,348 ----
  }
  
+ static void flip_page(void)
+ {
+ 	vo_draw_text(in_width, in_height, draw_alpha);
+ 	check_events();
+ 	put_frame();
+ }
+ 
  static void uninit(void)
  {
+ 	printf("vo_fbdev: uninit\n");
+ 	fb_var_info.xres_virtual = fb_xres_virtual;
+ 	fb_var_info.yres_virtual = fb_yres_virtual;
+ 	if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_var_info))
+ 		printf("vo_fbdev: Can't set virtual screensize to original value: %s\n", strerror(errno));
+ 	memset(next_frame, '\0', in_height * in_width * (fb_bpp / 8));
+ 	put_frame();
  	if (vt_active >= 0)
  		ioctl(vt_fd, VT_ACTIVATE, vt_active);
  	free(next_frame);
  	munmap(frame_buffer, fb_size);


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list