diff options
author | Rudolf Polzer <divverent@alientrap.org> | 2011-04-23 18:56:47 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-04-24 03:55:47 +0300 |
commit | 994b21a80a2f37b0d672526739cb742b87f33ad9 (patch) | |
tree | 222e014be69723c4772d5045fee35eb98ffc8a63 /libmpcodecs/vf_bmovl.c | |
parent | 28b3cc0efe7a575cb8004d1b109ce5ca2f2953bb (diff) | |
download | mpv-994b21a80a2f37b0d672526739cb742b87f33ad9.tar.bz2 mpv-994b21a80a2f37b0d672526739cb742b87f33ad9.tar.xz |
vf_*: fix pts values passed to the next filter
Many video filters failed to calculate or even just pass through pts
values for their output frames. Fix this, and also make the two
remaining filters that called vf_next_put_image() twice for the same
input frame (vf_softpulldown, vf_telecine) use vf_queue_frame() so
that e.g. framestepping properly sees both frames.
Changed filters: vf_bmovl, vf_detc, vf_divtc, vf_filmdint, vf_ivtc,
vf_lavc, vf_phase, vf_pullup, vf_softpulldown, vf_telecine, vf_tile,
vf_tinterlace.
Diffstat (limited to 'libmpcodecs/vf_bmovl.c')
-rw-r--r-- | libmpcodecs/vf_bmovl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index 3b46e1ebcc..b6b9940832 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -261,10 +261,10 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ else if( strncmp(cmd,"OPAQUE",6)==0 ) vf->priv->opaque=TRUE; else if( strncmp(cmd,"SHOW", 4)==0 ) vf->priv->hidden=FALSE; else if( strncmp(cmd,"HIDE", 4)==0 ) vf->priv->hidden=TRUE; - else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi, pts); else { mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Unknown command: '%s'. Ignoring.\n", cmd); - return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + return vf_next_put_image(vf, dmpi, pts); } if(command == CMD_ALPHA) { @@ -283,7 +283,7 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ buffer = malloc(imgw*imgh*pxsz); if(!buffer) { mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Couldn't allocate temporary buffer! Skipping...\n\n"); - return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + return vf_next_put_image(vf, dmpi, pts); } /* pipes/sockets might need multiple calls to read(): */ want = (imgw*imgh*pxsz); @@ -344,7 +344,7 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ if( (imgx <= vf->priv->x2) && ( (imgx+imgw) >= vf->priv->x2) ) vf->priv->x2 = imgx; } - return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + return vf_next_put_image(vf, dmpi, pts); } for( buf_y=0 ; (buf_y < imgh) && (buf_y < (vf->priv->h-imgy)) ; buf_y++ ) { @@ -402,7 +402,7 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ } } - if(vf->priv->hidden) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + if(vf->priv->hidden) return vf_next_put_image(vf, dmpi, pts); if(vf->priv->opaque) { // Just copy buffer memory to screen for( ypos=vf->priv->y1 ; ypos < vf->priv->y2 ; ypos++ ) { @@ -454,7 +454,7 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ } // for xpos } // for ypos } // if !opaque - return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); + return vf_next_put_image(vf, dmpi, pts); } // put_image static int |