From 291a150e81e631ae091b496b5c3a6771e9c6c28a Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 4 Aug 2008 13:25:20 +0000 Subject: Fixes unsafe 'switch_audio' command with set_property() call. Without it, MPlayer segv trying to dereference NULL demuxer. Patch by Mathieu Schroeter (mathieu dot schroeter at gamesover dot ch) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27411 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index b18080b6a4..1f9bf1e4f5 100644 --- a/command.c +++ b/command.c @@ -835,6 +835,8 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg, case M_PROPERTY_STEP_UP: case M_PROPERTY_SET: + if (!mpctx->demuxer) + return M_PROPERTY_UNAVAILABLE; if (action == M_PROPERTY_SET && arg) tmp = *((int *) arg); else -- cgit v1.2.3