aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-29 23:43:23 +0000
committerGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-29 23:43:23 +0000
commit3b76b153773b542aa8780a547ee4b8e9db6803a5 (patch)
treed6d0514d0fa919aafd57e8f968143365267d88a7 /libmpcodecs
parent35c29d0946e46c3befc8a83978018caafbfe4db9 (diff)
Auto insert vf_lavc for the MPEG vo's
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7972 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index caf619c9e1..084113f6fd 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -184,6 +184,23 @@ csp_again:
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;