Author: janderwald
Date: Sat Dec 19 21:45:29 2009
New Revision: 44659
URL:
http://svn.reactos.org/svn/reactos?rev=44659&view=rev
Log:
[MMIXER]
- Fix broken check in MMixerAddMixerControl, which only copied the node name on failure
- Add initialization of LineControlsExtraDat LIST_ENTRY type, which resulted in a crash
Modified:
trunk/reactos/lib/drivers/sound/mmixer/controls.c
Modified: trunk/reactos/lib/drivers/sound/mmixer/controls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmixer/c…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmixer/controls.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmixer/controls.c [iso-8859-1] Sat Dec 19 21:45:29
2009
@@ -207,7 +207,8 @@
/* get node name */
Status = MixerContext->Control(hDevice, IOCTL_KS_PROPERTY, (PVOID)&Node,
sizeof(KSP_NODE), (LPVOID)Name, BytesReturned, &BytesReturned);
- if (Status != MM_STATUS_SUCCESS)
+
+ if (Status == MM_STATUS_SUCCESS)
{
MixerContext->Copy(MixerControl->szShortName, Name,
(min(MIXER_SHORT_NAME_CHARS, wcslen(Name)+1)) * sizeof(WCHAR));
MixerControl->szShortName[MIXER_SHORT_NAME_CHARS-1] = L'\0';
@@ -300,7 +301,6 @@
{
MixerContext->Free(Desc);
MixerContext->Free(VolumeData);
-
return MM_STATUS_NO_MEMORY;
}
@@ -315,7 +315,6 @@
}
MixerContext->Free(Desc);
}
-
DPRINT("Status %x Name %S\n", Status, MixerControl->szName);
return MM_STATUS_SUCCESS;
@@ -594,6 +593,8 @@
DestinationLine->Line.Target.vDriverVersion =
MixerInfo->MixCaps.vDriverVersion;
wcscpy(DestinationLine->Line.Target.szPname, MixerInfo->MixCaps.szPname);
+ // initialize extra line
+ InitializeListHead(&DestinationLine->LineControlsExtraData);
// insert into mixer info
InsertHeadList(&MixerInfo->LineList, &DestinationLine->Entry);
@@ -988,7 +989,7 @@
IN LPMIXER_DATA MixerData,
IN PULONG DeviceCount)
{
- PKSMULTIPLE_ITEM NodeTypes, NodeConnections;
+ PKSMULTIPLE_ITEM NodeTypes = NULL, NodeConnections = NULL;
MIXER_STATUS Status;
ULONG PinCount;
ULONG NodeIndex;
@@ -1016,6 +1017,7 @@
}
// check if the filter has an wave out node
+
NodeIndex = MMixerGetIndexOfGuid(NodeTypes, &KSNODETYPE_DAC);
if (NodeIndex != MAXULONG)
{