diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-22 23:19:59 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-22 23:19:59 +0000 |
commit | c2ffe44a28afb9aea4477535197c52e19f3746a5 (patch) | |
tree | 2113595090415f743a49433d2b8d8a33f0e6c3f7 /libmpcodecs/vd.c | |
parent | 3526daed7ac957586b5a855ec56b4736191e7907 (diff) | |
download | mpv-c2ffe44a28afb9aea4477535197c52e19f3746a5.tar.bz2 mpv-c2ffe44a28afb9aea4477535197c52e19f3746a5.tar.xz |
Remove any auto-inserted lavc filter.
Makes sure it will not be around if we e.g. try again with a different codec,
which can lead to -vo null being excessively slow.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30391 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd.c')
-rw-r--r-- | libmpcodecs/vd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 3de3c1525a..29d0a1a612 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -206,7 +206,7 @@ csp_again: 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; + vf_instance_t* vo, *vp = NULL, *ve, *vpp = NULL; // Remove the scale filter if we added it ourself if(vf == sc) { ve = vf; @@ -214,14 +214,21 @@ csp_again: vf_uninit_filter(ve); } // Find the last filter (vf_vo) - for(vo = vf ; vo->next ; vo = vo->next) + for(vo = vf ; vo->next ; vo = vo->next) { + vpp = vp; 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; } + if (vp && !strcmp(vp->info->name,"lavc")) { + if (vpp) vpp->next = vo; + else vf = vo; + vf_uninit_filter(vp); + } } mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_VOincompCodec); sh->vf_initialized=-1; |