summaryrefslogtreecommitdiffstats
path: root/audio/mixer.c
diff options
context:
space:
mode:
authorshdown <shdownnine@gmail.com>2015-07-27 15:58:06 +0300
committerwm4 <wm4@nowhere>2015-07-27 15:07:51 +0200
commit5c8dd832bbf636f6849d47d8e50dba433d8f5af3 (patch)
tree5e46b52c4377eb0668e9927cc28ab98ba9f9330f /audio/mixer.c
parent1e91750c73e1a35e93d4aa37c2ab85ccd3ce13d9 (diff)
downloadmpv-5c8dd832bbf636f6849d47d8e50dba433d8f5af3.tar.bz2
mpv-5c8dd832bbf636f6849d47d8e50dba433d8f5af3.tar.xz
audio: fix restoring volume
Was broken by 68bbab0e42e141896545f1f6e9699bcad2d685f8, which changed the number of fields to scan, but not the expected return value.
Diffstat (limited to 'audio/mixer.c')
-rw-r--r--audio/mixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/mixer.c b/audio/mixer.c
index 29727918f6..26f426c2b4 100644
--- a/audio/mixer.c
+++ b/audio/mixer.c
@@ -317,7 +317,7 @@ static void restore_volume(struct mixer *mixer)
char drv[40];
float v_l, v_r;
int m;
- if (sscanf(data, "%39[^:]:%f:%f:%d", drv, &v_l, &v_r, &m) == 5) {
+ if (sscanf(data, "%39[^:]:%f:%f:%d", drv, &v_l, &v_r, &m) == 4) {
if (strcmp(mixer->driver, drv) == 0) {
force_vol_l = v_l;
force_vol_r = v_r;