summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-02 22:22:19 +0200
committerwm4 <wm4@nowhere>2012-10-03 01:41:13 +0200
commitdb565ca4f88dcd18b7e2a2a1e7a666d14f1e0a2f (patch)
tree017e1dfa5d80f8f9ac3a949fd7446da9d990fe3a /libao2
parente5afc1f405d0c45a4d712807aa8f30fffc71c6d6 (diff)
downloadmpv-db565ca4f88dcd18b7e2a2a1e7a666d14f1e0a2f.tar.bz2
mpv-db565ca4f88dcd18b7e2a2a1e7a666d14f1e0a2f.tar.xz
mplayer: fix crash when muted and audio codec fails
When audio codec initialization fails, reinit_audio_chain() will call uninit_player() to close the AO. mpctx->ao is set, but mpctx->mixer.ao is still NULL. uninit_player() assumes both variables are always the same, and calls mixer_uninit(), even though mpctx->mixer.ao is NULL. That function tries to access the ao without NULL check if mute was enabled. Fix this in mplayer.c by not relying on the assumption that mpctx->ao == mpctx->mixer.ao. Also, add a check for NULL to mixer.c (function muxer_uninit()). One of the checks is redundant and only one of them is needed, but we add both for general robustness.
Diffstat (limited to 'libao2')
0 files changed, 0 insertions, 0 deletions