mirror of https://github.com/mpv-player/mpv
Auto insert vf_lavc for the MPEG vo's
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7972 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
35c29d0946
commit
3b76b15377
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue