summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_yadif.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-14 02:51:24 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-14 03:42:05 +0200
commit38a76f7fdf5c03bc49072b693d7c53b343f2994a (patch)
tree0e8c7e419f8bbfe9ad55beba0fd17b3de94fb386 /libmpcodecs/vf_yadif.c
parent1f782eb802e9774bc53103e935eb673c283cf0aa (diff)
downloadmpv-38a76f7fdf5c03bc49072b693d7c53b343f2994a.tar.bz2
mpv-38a76f7fdf5c03bc49072b693d7c53b343f2994a.tar.xz
core: Better -nocorrect-pts pause and filter-added frames handling
Rewrite the -nocorrect-pts frame creation code. The new version always updates the visible frame when seeking while pausing, and supports filter-added frames. It can not time those properly though. Now the handling of filter-added frames in MPlayer always uses the new method independently of the value of correct-pts but MEncoder still expects the old behavior. Add a global variable that is set under MEncoder only and change the filters to choose behavior based on that instead of the correct_pts option.
Diffstat (limited to 'libmpcodecs/vf_yadif.c')
-rw-r--r--libmpcodecs/vf_yadif.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c
index fd46f241cd..2c80a2ec5b 100644
--- a/libmpcodecs/vf_yadif.c
+++ b/libmpcodecs/vf_yadif.c
@@ -416,9 +416,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
return continue_buffered_image(vf);
}
+extern const int under_mencoder;
+
static int continue_buffered_image(struct vf_instance *vf)
{
- struct MPOpts *opts = vf->opts;
mp_image_t *mpi = vf->priv->buffered_mpi;
int tff = vf->priv->buffered_tff;
double pts = vf->priv->buffered_pts;
@@ -435,10 +436,10 @@ static int continue_buffered_image(struct vf_instance *vf)
mpi->width,mpi->height);
vf_clone_mpi_attributes(dmpi, mpi);
filter(vf->priv, dmpi->planes, dmpi->stride, mpi->w, mpi->h, i ^ tff ^ 1, tff);
- if (opts->correct_pts && i < (vf->priv->mode & 1))
+ if (i < (vf->priv->mode & 1) && !under_mencoder)
vf_queue_frame(vf, continue_buffered_image);
ret |= vf_next_put_image(vf, dmpi, pts /*FIXME*/);
- if (opts->correct_pts)
+ if (!under_mencoder)
break;
if(i<(vf->priv->mode&1))
vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);