[Mplayer-cvslog] CVS: main/libmpcodecs vf_vo.c,1.2,1.3

Arpi of Ize arpi at mplayer.dev.hu
Sun Apr 7 04:12:17 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv6479/libmpcodecs

Modified Files:
	vf_vo.c 
Log Message:
vo_config_count now counts calls to vo->config()

Index: vf_vo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_vo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_vo.c	6 Apr 2002 22:46:20 -0000	1.2
+++ vf_vo.c	7 Apr 2002 02:12:15 -0000	1.3
@@ -19,6 +19,7 @@
 	unsigned int flags, unsigned int outfmt){
     if(video_out->config(width,height,d_width,d_height,flags,"MPlayer",outfmt,NULL))
 	return 0;
+    ++vo_config_count;
     return 1;
 }
 
@@ -34,12 +35,13 @@
 
 static void get_image(struct vf_instance_s* vf,
         mp_image_t *mpi){
-    if(vo_directrendering) 
+    if(vo_directrendering && vo_config_count)
 	video_out->control(VOCTRL_GET_IMAGE,mpi);
 }
 
 static void put_image(struct vf_instance_s* vf,
         mp_image_t *mpi){
+  if(!vo_config_count) return; // vo not configured?
   // first check, maybe the vo/vf plugin implements draw_image using mpi:
   if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return; // done.
   // nope, fallback to old draw_frame/draw_slice:
@@ -54,6 +56,7 @@
 
 static void draw_slice(struct vf_instance_s* vf,
         unsigned char* src, int* stride, int w,int h, int x, int y){
+    if(!vo_config_count) return; // vo not configured?
     video_out->draw_slice(src,stride,w,h,x,y);
 }
 




More information about the MPlayer-cvslog mailing list