[MPlayer-cvslog] r29658 - trunk/command.c
reimar
subversion at mplayerhq.hu
Tue Sep 8 11:06:44 CEST 2009
Author: reimar
Date: Tue Sep 8 11:06:43 2009
New Revision: 29658
Log:
Never switch to a program with no audio and no video.
Modified:
trunk/command.c
Modified: trunk/command.c
==============================================================================
--- trunk/command.c Tue Sep 8 10:55:05 2009 (r29657)
+++ trunk/command.c Tue Sep 8 11:06:43 2009 (r29658)
@@ -945,6 +945,10 @@ static int mp_property_program(m_option_
&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;
More information about the MPlayer-cvslog
mailing list