[MPlayer-cvslog] r35481 - trunk/libmpcodecs/vf_expand.c
reimar
subversion at mplayerhq.hu
Sun Nov 25 20:37:22 CET 2012
Author: reimar
Date: Sun Nov 25 20:37:21 2012
New Revision: 35481
Log:
Expand: when using DR clear the part of the image that
is padding for the decoder and thus will contain nonsense
after decoding.
Modified:
trunk/libmpcodecs/vf_expand.c
Modified: trunk/libmpcodecs/vf_expand.c
==============================================================================
--- trunk/libmpcodecs/vf_expand.c Sun Nov 25 16:51:38 2012 (r35480)
+++ trunk/libmpcodecs/vf_expand.c Sun Nov 25 20:37:21 2012 (r35481)
@@ -407,12 +407,19 @@ static int put_image(struct vf_instance
}
if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
+ int full_w = FFMIN(mpi->width, vf->priv->exp_w);
+ int full_h = FFMIN(mpi->height, vf->priv->exp_h);
vf->dmpi=mpi->priv;
if(!vf->dmpi) { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL); return 0; }
mpi->priv=NULL;
#ifdef OSD_SUPPORT
if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
#endif
+ // padding for use by decoder needs to be cleared
+ if (mpi->w < full_w)
+ vf_mpi_clear(mpi, mpi->w, 0, full_w - mpi->w, full_h);
+ if (mpi->h < full_h)
+ vf_mpi_clear(mpi, 0, mpi->h, full_w, full_h - mpi->h);
// we've used DR, so we're ready...
if(!(mpi->flags&MP_IMGFLAG_PLANAR))
vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
More information about the MPlayer-cvslog
mailing list