diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-05-25 20:31:10 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 03:34:39 +0200 |
commit | f0965d83560496b6b522a881b618cc03eb09ebcb (patch) | |
tree | 9d4180da10799530881aa2b2bf30f629c95ed53f /libmpcodecs/vf_ass.c | |
parent | 719d1260231ff41e804626328abc4570eded66dc (diff) | |
download | mpv-f0965d83560496b6b522a881b618cc03eb09ebcb.tar.bz2 mpv-f0965d83560496b6b522a881b618cc03eb09ebcb.tar.xz |
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
Diffstat (limited to 'libmpcodecs/vf_ass.c')
-rw-r--r-- | libmpcodecs/vf_ass.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c index 0d14dff446..0eabc50bb3 100644 --- a/libmpcodecs/vf_ass.c +++ b/libmpcodecs/vf_ass.c @@ -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)) { |