diff options
author | wm4 <wm4@nowhere> | 2014-11-11 18:47:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-11 18:47:21 +0100 |
commit | 599a4a8769d0c76c596f207f9d920ae2722cd2a3 (patch) | |
tree | 409882f74379ff86a9706bf5d80ab74dab5b378a | |
parent | 67e0230905ff6f725806d2aa907dad8f7e1f4c7a (diff) | |
download | mpv-599a4a8769d0c76c596f207f9d920ae2722cd2a3.tar.bz2 mpv-599a4a8769d0c76c596f207f9d920ae2722cd2a3.tar.xz |
vf_sub: don't crash if no subtitle context is available
Happens with --vf=sub,sub (only the first one gets the context).
-rw-r--r-- | video/filter/vf_sub.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |