diff options
author | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-08-04 13:25:20 +0000 |
---|---|---|
committer | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-08-04 13:25:20 +0000 |
commit | 291a150e81e631ae091b496b5c3a6771e9c6c28a (patch) | |
tree | 0b68981d0ed1c3e40a0de086d7e68b75d831dc98 /command.c | |
parent | 127339a624f85f1ad35effbb932205079b94aa37 (diff) | |
download | mpv-291a150e81e631ae091b496b5c3a6771e9c6c28a.tar.bz2 mpv-291a150e81e631ae091b496b5c3a6771e9c6c28a.tar.xz |
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
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |