summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/out/ao_wasapi_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c
index 9bd0d00135..d260711d27 100644
--- a/audio/out/ao_wasapi_utils.c
+++ b/audio/out/ao_wasapi_utils.c
@@ -169,10 +169,13 @@ static void set_waveformat_with_ao(WAVEFORMATEXTENSIBLE *wformat, struct ao *ao)
af_get_best_sample_formats(ao->format, alt_formats);
for (int n = 0; alt_formats[n]; n++) {
for (int i = 0; wasapi_formats[i].mp_format; i++) {
- if (wasapi_formats[i].mp_format == alt_formats[n])
+ if (wasapi_formats[i].mp_format == alt_formats[n]) {
format = wasapi_formats[i];
+ goto found_format;
+ }
}
}
+ found_format:
set_waveformat(wformat, format, ao->samplerate, &channels);
}