vf_sub: fix previous commit

The previous fix breaks another obscure case: if the second vf_sub adds
margins, the image is accidentally not extended, which would return in
an assertion failure when returning the bogus image.
This commit is contained in:
wm4 2014-11-11 19:26:43 +01:00
parent 599a4a8769
commit 481ab94c4e
1 changed files with 3 additions and 3 deletions

View File

@ -94,9 +94,6 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
struct vf_priv_s *priv = vf->priv;
struct osd_state *osd = priv->osd;
if (!osd)
return mpi;
if (vf->priv->opt_top_margin || vf->priv->opt_bottom_margin) {
struct mp_image *dmpi = vf_alloc_out_image(vf);
if (!dmpi)
@ -107,6 +104,9 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
mpi = dmpi;
}
if (!osd)
return mpi;
osd_draw_on_image_p(osd, priv->dim, mpi->pts, OSD_DRAW_SUB_FILTER,
vf->out_pool, mpi);