summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-15 23:11:25 +0200
committerwm4 <wm4@nowhere>2016-07-15 23:11:25 +0200
commit79974e7ad94e7658c780e3b446a7822a533675e4 (patch)
treec385b2f1c2afeda4f72a640b5a134a870fcf04e6 /audio
parentea18cb99ba909c0deaafa83214a5f6c44caf8e1c (diff)
downloadmpv-79974e7ad94e7658c780e3b446a7822a533675e4.tar.bz2
mpv-79974e7ad94e7658c780e3b446a7822a533675e4.tar.xz
audio: fix crashes due to broken uninit check
Since mixer->ao is always NULL now (it was really just forgotten to be removed), the uninit call never actually cleared the af field, leaving a dangling pointer that could be accessed by volume control.
Diffstat (limited to 'audio')
-rw-r--r--audio/mixer.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/audio/mixer.c b/audio/mixer.c
index a58a814649..795edfa628 100644
--- a/audio/mixer.c
+++ b/audio/mixer.c
@@ -23,7 +23,6 @@
#include <libavutil/common.h>
#include "config.h"
-#include "audio/out/ao.h"
#include "audio/filter/af.h"
#include "common/global.h"
#include "common/msg.h"
@@ -33,7 +32,6 @@
struct mixer {
struct mp_log *log;
struct MPOpts *opts;
- struct ao *ao;
struct af_stream *af;
// Other stuff
float balance;
@@ -145,8 +143,5 @@ void mixer_reinit_audio(struct mixer *mixer, struct af_stream *af)
*/
void mixer_uninit_audio(struct mixer *mixer)
{
- if (!mixer->ao)
- return;
-
mixer->af = NULL;
}