mirror of https://github.com/mpv-player/mpv
vf_sub: don't crash if no subtitle context is available
Happens with --vf=sub,sub (only the first one gets the context).
This commit is contained in:
parent
67e0230905
commit
599a4a8769
|
@ -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 vf_priv_s *priv = vf->priv;
|
||||||
struct osd_state *osd = priv->osd;
|
struct osd_state *osd = priv->osd;
|
||||||
|
|
||||||
|
if (!osd)
|
||||||
|
return mpi;
|
||||||
|
|
||||||
if (vf->priv->opt_top_margin || vf->priv->opt_bottom_margin) {
|
if (vf->priv->opt_top_margin || vf->priv->opt_bottom_margin) {
|
||||||
struct mp_image *dmpi = vf_alloc_out_image(vf);
|
struct mp_image *dmpi = vf_alloc_out_image(vf);
|
||||||
if (!dmpi)
|
if (!dmpi)
|
||||||
|
|
Loading…
Reference in New Issue