From 599a4a8769d0c76c596f207f9d920ae2722cd2a3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 11 Nov 2014 18:47:21 +0100 Subject: vf_sub: don't crash if no subtitle context is available Happens with --vf=sub,sub (only the first one gets the context). --- video/filter/vf_sub.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video') diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c index e2d633dce7..b9551d59da 100644 --- a/video/filter/vf_sub.c +++ b/video/filter/vf_sub.c @@ -94,6 +94,9 @@ 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) -- cgit v1.2.3