Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b618a6c6
Commit
b618a6c6
authored
Nov 05, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f836995e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
gstdemux.c
dlls/winegstreamer/gstdemux.c
+3
-3
main.c
dlls/winegstreamer/main.c
+4
-4
No files found.
dlls/winegstreamer/gstdemux.c
View file @
b618a6c6
...
...
@@ -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
;
...
...
dlls/winegstreamer/main.c
View file @
b618a6c6
...
...
@@ -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
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment