mirror of https://github.com/mpv-player/mpv
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:
parent
719d126023
commit
f0965d8356
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue