summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 15:59:53 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 15:59:53 +0200
commite28e4a1b157bd0e9620fcff956d713a9921f506c (patch)
treed92e54e1e25feb84e692396cf234478f403e5738 /libmpcodecs/vd.c
parent560acfd0407c757e17bf72b490687d4947b05675 (diff)
parent213092c8dcfc925d8d54cf320b60cf298a870696 (diff)
downloadmpv-e28e4a1b157bd0e9620fcff956d713a9921f506c.tar.bz2
mpv-e28e4a1b157bd0e9620fcff956d713a9921f506c.tar.xz
Merge svn changes up to r30419
Diffstat (limited to 'libmpcodecs/vd.c')
-rw-r--r--libmpcodecs/vd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 1910af62ee..1821498865 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -189,7 +189,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
} 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 ourselves
if (vf == sc) {
ve = vf;
@@ -197,8 +197,10 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
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(opts, vo, "lavc", NULL);
@@ -208,6 +210,13 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
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_tmsg(MSGT_CPLAYER, MSGL_WARN,
"The selected video_out device is incompatible with this codec.\n"\