diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-14 02:51:24 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-14 03:42:05 +0200 |
commit | 38a76f7fdf5c03bc49072b693d7c53b343f2994a (patch) | |
tree | 0e8c7e419f8bbfe9ad55beba0fd17b3de94fb386 /libmpcodecs/vf_tfields.c | |
parent | 1f782eb802e9774bc53103e935eb673c283cf0aa (diff) | |
download | mpv-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_tfields.c')
-rw-r--r-- | libmpcodecs/vf_tfields.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c index 0d88119371..347cd4bb9e 100644 --- a/libmpcodecs/vf_tfields.c +++ b/libmpcodecs/vf_tfields.c @@ -310,9 +310,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; int i=vf->priv->buffered_i; double pts = vf->priv->buffered_pts; mp_image_t *mpi = vf->priv->buffered_mpi; @@ -363,7 +364,7 @@ static int continue_buffered_image(struct vf_instance *vf) dmpi->stride[2] = 2*mpi->stride[2]; } ret |= vf_next_put_image(vf, dmpi, pts); - if (opts->correct_pts) + if (!under_mencoder) break; else if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); @@ -393,7 +394,7 @@ static int continue_buffered_image(struct vf_instance *vf) mpi->chroma_width, mpi->chroma_height, (i^!tff)); } ret |= vf_next_put_image(vf, dmpi, pts); - if (opts->correct_pts) + if (!under_mencoder) break; else if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); @@ -419,7 +420,7 @@ static int continue_buffered_image(struct vf_instance *vf) dmpi->stride[2], mpi->stride[2]*2, (i^!tff)); } ret |= vf_next_put_image(vf, dmpi, pts); - if (opts->correct_pts) + if (!under_mencoder) break; else if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL); |