[ros-diffs] [janderwald] 41674: - Fix broken check for KSDATARANGE_AUDIO - Zero struct

janderwald at svn.reactos.org janderwald at svn.reactos.org
Sun Jun 28 22:06:46 CEST 2009


Author: janderwald
Date: Mon Jun 29 00:06:45 2009
New Revision: 41674

URL: http://svn.reactos.org/svn/reactos?rev=41674&view=rev
Log:
- Fix broken check for KSDATARANGE_AUDIO
- Zero struct

Modified:
    trunk/reactos/drivers/wdm/audio/sysaudio/control.c

Modified: trunk/reactos/drivers/wdm/audio/sysaudio/control.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio/control.c?rev=41674&r1=41673&r2=41674&view=diff
==============================================================================
--- trunk/reactos/drivers/wdm/audio/sysaudio/control.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/sysaudio/control.c [iso-8859-1] Mon Jun 29 00:06:45 2009
@@ -321,13 +321,16 @@
             return;
         }
 
+        /* Zero pin connect */
+        RtlZeroMemory(MixerPinConnect, sizeof(KSPIN_CONNECT) + sizeof(KSDATAFORMAT_WAVEFORMATEX));
+
         /* Copy initial connect details */
         RtlMoveMemory(MixerPinConnect, WorkerContext->PinConnect, sizeof(KSPIN_CONNECT));
 
 
         OutputFormat = (PKSDATAFORMAT_WAVEFORMATEX)(MixerPinConnect + 1);
 
-        Status = ComputeCompatibleFormat(WorkerContext->Entry, WorkerContext->PinConnect->PinId, WorkerContext->DeviceExtension, (PKSDATAFORMAT_WAVEFORMATEX)(WorkerContext->PinConnect + 1), OutputFormat);
+        Status = ComputeCompatibleFormat(WorkerContext->Entry, WorkerContext->PinConnect->PinId, WorkerContext->DeviceExtension, InputFormat, OutputFormat);
         if (!NT_SUCCESS(Status))
         {
             DPRINT1("ComputeCompatibleFormat failed with %x\n", Status);
@@ -612,6 +615,7 @@
         {
             UNIMPLEMENTED
             AudioRange = (PKSDATARANGE_AUDIO)((PUCHAR)AudioRange + AudioRange->DataRange.FormatSize);
+            continue;
         }
         /* Select best quality available */
 



More information about the Ros-diffs mailing list