mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 18:28:01 +00:00
audio: fix restoring volume
Was broken by 68bbab0e42
, which changed
the number of fields to scan, but not the expected return value.
This commit is contained in:
parent
1e91750c73
commit
5c8dd832bb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user