mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 09:57:19 +00:00
winegstreamer: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f836995ed5
commit
b618a6c6a7
|
@ -794,12 +794,12 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
|
|||
piOutput.dir = PINDIR_OUTPUT;
|
||||
piOutput.pFilter = &This->filter.IBaseFilter_iface;
|
||||
name = gst_pad_get_name(pad);
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, piOutput.achName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]) - 1);
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, piOutput.achName, ARRAY_SIZE(piOutput.achName) - 1);
|
||||
TRACE("Name: %s\n", name);
|
||||
strcpy(my_name, "qz_sink_");
|
||||
strcat(my_name, name);
|
||||
g_free(name);
|
||||
piOutput.achName[sizeof(piOutput.achName) / sizeof(piOutput.achName[0]) - 1] = 0;
|
||||
piOutput.achName[ARRAY_SIZE(piOutput.achName) - 1] = 0;
|
||||
|
||||
caps = gst_pad_query_caps(pad, NULL);
|
||||
caps = gst_caps_make_writable(caps);
|
||||
|
@ -1259,7 +1259,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr)
|
|||
piInput = &This->pInputPin.pin.pinInfo;
|
||||
piInput->dir = PINDIR_INPUT;
|
||||
piInput->pFilter = &This->filter.IBaseFilter_iface;
|
||||
lstrcpynW(piInput->achName, wcsInputPinName, sizeof(piInput->achName) / sizeof(piInput->achName[0]));
|
||||
lstrcpynW(piInput->achName, wcsInputPinName, ARRAY_SIZE(piInput->achName));
|
||||
This->pInputPin.pin.IPin_iface.lpVtbl = &GST_InputPin_Vtbl;
|
||||
This->pInputPin.pin.refCount = 1;
|
||||
This->pInputPin.pin.pConnectedTo = NULL;
|
||||
|
|
|
@ -223,7 +223,7 @@ FactoryTemplate const g_Templates[] = {
|
|||
},
|
||||
};
|
||||
|
||||
const int g_cTemplates = sizeof(g_Templates) / sizeof (g_Templates[0]);
|
||||
const int g_cTemplates = ARRAY_SIZE(g_Templates);
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ static HRESULT register_server(BOOL do_register)
|
|||
INF_SET_ID(MEDIATYPE_Stream);
|
||||
INF_SET_ID(WINESUBTYPE_Gstreamer);
|
||||
|
||||
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
|
||||
for(i = 0; i < ARRAY_SIZE(pse); i++) {
|
||||
pse[i].pszValue = HeapAlloc(GetProcessHeap(),0,39);
|
||||
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
|
||||
|
@ -331,7 +331,7 @@ static HRESULT register_server(BOOL do_register)
|
|||
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
|
||||
}
|
||||
|
||||
strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
|
||||
strtable.cEntries = ARRAY_SIZE(pse);
|
||||
strtable.pse = pse;
|
||||
|
||||
hAdvpack = LoadLibraryW(wszAdvpack);
|
||||
|
@ -339,7 +339,7 @@ static HRESULT register_server(BOOL do_register)
|
|||
|
||||
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
|
||||
|
||||
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
|
||||
for(i = 0; i < ARRAY_SIZE(pse); i++)
|
||||
HeapFree(GetProcessHeap(),0,pse[i].pszValue);
|
||||
|
||||
if(FAILED(hres)) {
|
||||
|
|
Loading…
Reference in a new issue