summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-11 19:26:43 +0100
committerwm4 <wm4@nowhere>2014-11-11 19:26:43 +0100
commit481ab94c4e16da53def1b4329b8e2883f40fae8e (patch)
tree7b35a82ab8ca47fcce27a51a0d88c176620e3a52 /video
parent599a4a8769d0c76c596f207f9d920ae2722cd2a3 (diff)
downloadmpv-481ab94c4e16da53def1b4329b8e2883f40fae8e.tar.bz2
mpv-481ab94c4e16da53def1b4329b8e2883f40fae8e.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_sub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index b9551d59da..b30448cf9c 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -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);