diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-16 22:28:12 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-16 22:28:12 +0300 |
commit | e1ecc4315265c465080616b8d8d9257b3aab6ee9 (patch) | |
tree | d8a3aacf1b5468c59da202e44c5035924f5c1a3e /command.c | |
parent | 0e1b7765be878491565cf5e471f22b15e106164c (diff) | |
parent | 4dae2a980c4313deed6ddb69556d2ead4417119c (diff) | |
download | mpv-e1ecc4315265c465080616b8d8d9257b3aab6ee9.tar.bz2 mpv-e1ecc4315265c465080616b8d8d9257b3aab6ee9.tar.xz |
Merge svn changes up to r29684
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -974,6 +974,10 @@ static int mp_property_program(m_option_t *prop, int action, void *arg, &prog) == DEMUXER_CTRL_NOTIMPL) return M_PROPERTY_ERROR; + if (prog.aid < 0 && prog.vid < 0) { + mp_msg(MSGT_CPLAYER, MSGL_ERR, "Selected program contains no audio or video streams!\n"); + return M_PROPERTY_ERROR; + } mp_property_do("switch_audio", M_PROPERTY_SET, &prog.aid, mpctx); mp_property_do("switch_video", M_PROPERTY_SET, &prog.vid, mpctx); return M_PROPERTY_OK; |