changeset 34882:649d4cad4619

Request a sufficiently large image for direct rendering. Due to alignment and similar, we might need a buffer larger than the output of the ASS filter. Fixes out of bound writes and/or broken video near the borders.
author reimar
date Fri, 25 May 2012 20:31:10 +0000
parents 5bc8a3ca5068
children 3efd3d87424b
files libmpcodecs/vf_ass.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_ass.c	Thu May 24 12:56:31 2012 +0000
+++ b/libmpcodecs/vf_ass.c	Fri May 25 20:31:10 2012 +0000
@@ -111,7 +111,8 @@
     // width never changes, always try full DR
     mpi->priv = vf->dmpi = vf_get_image(vf->next, mpi->imgfmt, mpi->type,
                                         mpi->flags | MP_IMGFLAG_READABLE,
-                                        vf->priv->outw, vf->priv->outh);
+                                        FFMAX(mpi->width,  vf->priv->outw),
+                                        FFMAX(mpi->height, vf->priv->outh));
 
     if ( (vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
         !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)) {