diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-06-13 00:14:47 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-06-13 00:14:47 +0300 |
commit | c67b681e4c87bc28e39c4897062b2c492d067c34 (patch) | |
tree | 5a895c0507b243afca50b89deca5641020dfb16e /command.c | |
parent | f48840f8204d754026350c046b5b0ab03a9c8b80 (diff) | |
download | mpv-c67b681e4c87bc28e39c4897062b2c492d067c34.tar.bz2 mpv-c67b681e4c87bc28e39c4897062b2c492d067c34.tar.xz |
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.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |