vf_ass: request a sufficiently large image for direct rendering

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.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34970 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
This commit is contained in:
mplayer-svn 2012-05-25 20:31:10 +00:00 committed by wm4
parent 719d126023
commit f0965d8356
1 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include <string.h>
#include <inttypes.h>
#include <assert.h>
#include <libavutil/common.h>
#include "config.h"
#include "mp_msg.h"
@ -114,7 +115,8 @@ static void get_image(struct vf_instance *vf, mp_image_t *mpi)
// 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)) {