From c67b681e4c87bc28e39c4897062b2c492d067c34 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 13 Jun 2009 00:14:47 +0300 Subject: Disallow subtitles without video Make sure no subtitle stream can be selected when no video stream exists. The code doesn't handle subtitles without video properly and it was possible to trigger crashes in some cases. --- command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command.c b/command.c index 2a51b244c7..88f0a663dd 100644 --- a/command.c +++ b/command.c @@ -1360,8 +1360,8 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, int source = -1, reset_spu = 0; char *sub_name; - if (global_sub_size <= 0) - return M_PROPERTY_UNAVAILABLE; + if (!mpctx->sh_video || global_sub_size <= 0) + return M_PROPERTY_UNAVAILABLE; switch (action) { case M_PROPERTY_GET: -- cgit v1.2.3