[Mplayer-cvslog] CVS: main/libmpcodecs dec_video.c,1.124,1.125 vd.c,1.21,1.22

Arpi of Ize arpi at mplayer.dev.hu
Mon Mar 18 04:08:23 CET 2002


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

Modified Files:
	dec_video.c vd.c 
Log Message:
supports query_format in codecs

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- dec_video.c	18 Mar 2002 01:47:14 -0000	1.124
+++ dec_video.c	18 Mar 2002 03:08:21 -0000	1.125
@@ -41,7 +41,7 @@
 
 int divx_quality=0;
 
-static vd_functions_t* mpvdec=NULL;
+vd_functions_t* mpvdec=NULL;
 
 int get_video_quality_max(sh_video_t *sh_video){
   if(mpvdec){

Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vd.c	18 Mar 2002 01:47:47 -0000	1.21
+++ vd.c	18 Mar 2002 03:08:21 -0000	1.22
@@ -108,6 +108,8 @@
 static mp_image_t* export_images[1];
 static int static_idx=0;
 
+extern vd_functions_t* mpvdec; // FIXME!
+
 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){
     int i,j;
     unsigned int out_fmt=0;
@@ -127,9 +129,12 @@
 	if(out_fmt==(signed int)0xFFFFFFFF) continue;
 	vo_flags=video_out->control(VOCTRL_QUERY_FORMAT, &out_fmt);
 	mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X (i=%d) \n",vo_format_name(out_fmt),vo_flags,i);
-	// TODO: check (query) if codec really support this outfmt...
-	if(vo_flags&2){j=i; break;}
-	if(vo_flags && j<0) j=i;
+	if((vo_flags&2) || (vo_flags && j<0)){
+	    // check (query) if codec really support this outfmt...
+	    if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE)
+		continue;
+	    j=i; if(vo_flags&2) break;
+	}
     }
     if(j<0){
 	// TODO: no match - we should use conversion...




More information about the MPlayer-cvslog mailing list