[vlc-commits] wasapi: don't try to convert unsupported formats

Thomas Guillem git at videolan.org
Fri Oct 7 18:59:38 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Oct  7 15:43:38 2016 +0200| [bf8c5ab219c2bc635b00b9af06957b89700ffebe] | committer: Thomas Guillem

wasapi: don't try to convert unsupported formats

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf8c5ab219c2bc635b00b9af06957b89700ffebe
---

 modules/audio_output/wasapi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 050a8c9..4ad4ac2 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -485,12 +485,14 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
          * is no such limitation for PCM). */
         buffer_duration = CLOCK_FREQ * 10 * 1024 * 1024 / pwf->nAvgBytesPerSec;
     }
-    else
+    else if (AOUT_FMT_LINEAR(&fmt))
     {
         vlc_ToWave(pwfe, &fmt);
         shared_mode = AUDCLNT_SHAREMODE_SHARED;
         buffer_duration = AOUT_MAX_PREPARE_TIME * 10;
     }
+    else
+        goto error;
 
     hr = IAudioClient_IsFormatSupported(sys->client, shared_mode,
                                         pwf, &pwf_closest);



More information about the vlc-commits mailing list