[Mplayer-cvslog] CVS: main/libmpcodecs vd.c,1.58,1.59

Alban Bedel CVS albeu at mplayerhq.hu
Wed Oct 30 00:43:27 CET 2002


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

Modified Files:
	vd.c 
Log Message:
Auto insert vf_lavc for the MPEG vo's 


Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- vd.c	25 Oct 2002 16:48:53 -0000	1.58
+++ vd.c	29 Oct 2002 23:43:23 -0000	1.59
@@ -184,6 +184,23 @@
 	    mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_CouldNotFindColorspace);
 	    vf=vf_open_filter(vf,"scale",NULL);
 	    goto csp_again;
+	} else { // sws failed, if the last filter (vf_vo) support MPEGPES try to append vf_lavc
+	     vf_instance_t* vo, *vp = NULL, *ve;
+	     // Remove the scale filter
+	     if(strcmp(vf->info->name,"scale") == 0) {
+	       ve = vf;
+	       vf = vf->next;
+	       vf_uninit_filter(ve);
+	     }
+	     // Find the last filter (vf_vo)
+	     for(vo = vf ; vo->next ; vo = vo->next)
+	       vp = vo;
+	     if(vo->query_format(vo,IMGFMT_MPEGPES) && (!vp || (vp && strcmp(vp->info->name,"lavc")))) {
+	       ve = vf_open_filter(vo,"lavc",NULL);
+	       if(vp) vp->next = ve;
+		 else vf = ve;
+	       goto csp_again;
+	     }
 	}
 	mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_VOincompCodec);
 	sh->vf_inited=-1;




More information about the MPlayer-cvslog mailing list