# HG changeset patch # User reimar # Date 1338410042 0 # Node ID b510e6c954274f20a77ea635a6dcaf0f30d6720f # Parent 73842c97cac06c9a402ec1839bd263d801b43bbd unsharp: actually process the frame we got. Previously it would always process the last frame allocated, but that might be a different one than the one first returned. diff -r 73842c97cac0 -r b510e6c95427 libmpcodecs/vf_unsharp.c --- a/libmpcodecs/vf_unsharp.c Wed May 30 19:33:09 2012 +0000 +++ b/libmpcodecs/vf_unsharp.c Wed May 30 20:34:02 2012 +0000 @@ -165,6 +165,7 @@ if( mpi->imgfmt!=vf->priv->outfmt ) return; // colorspace differ + mpi->priv = vf->dmpi = vf_get_image( vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h ); mpi->planes[0] = vf->dmpi->planes[0]; mpi->stride[0] = vf->dmpi->stride[0]; @@ -179,12 +180,11 @@ } static int put_image( struct vf_instance *vf, mp_image_t *mpi, double pts) { - mp_image_t *dmpi; + mp_image_t *dmpi = mpi->priv; if( !(mpi->flags & MP_IMGFLAG_DIRECT) ) // no DR, so get a new image! hope we'll get DR buffer: - vf->dmpi = vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->w, mpi->h); - dmpi= vf->dmpi; + dmpi = vf->dmpi = vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->w, mpi->h); unsharp( dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam ); unsharp( dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam );