[Mplayer-cvslog] CVS: main/libmpcodecs dec_video.c,1.133,1.134 vd.c,1.36,1.37

Arpi of Ize arpi at mplayerhq.hu
Wed May 1 19:39:56 CEST 2002


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

Modified Files:
	dec_video.c vd.c 
Log Message:
setting vf_inited flag, some printf->mp_msg, some MSGL_FATAL->MSGL_WARN

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- dec_video.c	27 Apr 2002 21:03:59 -0000	1.133
+++ dec_video.c	1 May 2002 17:39:46 -0000	1.134
@@ -136,6 +136,7 @@
 
 int init_video(sh_video_t *sh_video,char* codecname,int vfm,int status){
     sh_video->codec=NULL;
+    sh_video->vf_inited=0;
     while((sh_video->codec=find_codec(sh_video->format,
       sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,
       sh_video->codec,0) )){
@@ -151,14 +152,14 @@
 	    if(mpcodecs_vd_drivers[i]->info->id==sh_video->codec->driver) break;
 	mpvdec=mpcodecs_vd_drivers[i];
 	if(!mpvdec){ // driver not available (==compiled in)
-	    mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Requested video codec family [%s] (vfm=%d) not available (enable it at compile time!)\n",
+	    mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Requested video codec family [%s] (vfm=%d) not available (enable it at compile time!)\n",
 		sh_video->codec->name, sh_video->codec->driver);
 	    continue;
 	}
 	// it's available, let's try to init!
-	printf("Opening Video Decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name);
+	mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Opening Video Decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name);
 	if(!mpvdec->init(sh_video)){
-	    printf("VDecoder init failed :(\n");
+	    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDecoder init failed :(\n");
 	    continue; // try next...
 	}
 	// Yeah! We got it!

Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- vd.c	29 Apr 2002 20:05:11 -0000	1.36
+++ vd.c	1 May 2002 17:39:46 -0000	1.37
@@ -137,7 +137,7 @@
     mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d, %s  \n",
 	w,h,vo_format_name(preferred_outfmt));
 
-    if(!vf) return 1; // temp hack
+//    if(!vf) return 1; // temp hack
     
     if(get_video_quality_max(sh)<=0 && divx_quality){
 	// user wants postprocess but no pp filter yet:
@@ -167,7 +167,8 @@
 	    vf=vf_open_filter(vf,"scale",NULL);
 	    goto csp_again;
 	}
-	mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VOincompCodec);
+	mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_VOincompCodec);
+	sh->vf_inited=-1;
 	return 0;	// failed
     }
     out_fmt=sh->codec->outfmt[j];
@@ -262,19 +263,12 @@
                       fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
                       out_fmt)==0){
 //                      "MPlayer",out_fmt,&vtune)){
-	mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO);
-	return 0; // exit_player(MSGTR_Exit_error);
+	mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_CannotInitVO);
+	sh->vf_inited=-1;
+	return 0;
     }
 
-#if 0
-#define FREE_MPI(mpi) if(mpi){if(mpi->flags&MP_IMGFLAG_ALLOCATED) free(mpi->planes[0]); free(mpi); mpi=NULL;}
-    FREE_MPI(static_images[0])
-    FREE_MPI(static_images[1])
-    FREE_MPI(temp_images[0])
-    FREE_MPI(export_images[0])
-#undef FREE_MPI
-#endif
-
+    sh->vf_inited=1;
     return 1;
 }
 




More information about the MPlayer-cvslog mailing list