From 4389ddcc349dca38309e7597274a6b7e4c8301e8 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sun, 9 Jul 2017 15:19:50 -0700 Subject: [PATCH] ao_wasapi: don't repeat format negotiation on align hack Even if it did return a different result, the bufferFrameCount from the align hack would be wrong anyway. --- audio/out/ao_wasapi_utils.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 8f5da03545..e00b763e8e 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -984,10 +984,13 @@ retry: EXIT_ON_ERROR(hr); } - MP_DBG(ao, "Probing formats\n"); - if (!find_formats(ao)) { - hr = E_FAIL; - EXIT_ON_ERROR(hr); + // In the event of an align hack, we've already done this. + if (!align_hack) { + MP_DBG(ao, "Probing formats\n"); + if (!find_formats(ao)) { + hr = E_FAIL; + EXIT_ON_ERROR(hr); + } } MP_DBG(ao, "Fixing format\n");