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
bab08e69
Commit
bab08e69
authored
Jul 26, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Jul 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Avoid side-effects in asserts.
parent
cc45c137
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
avisplit.c
dlls/quartz/avisplit.c
+17
-5
parser.c
dlls/quartz/parser.c
+5
-2
No files found.
dlls/quartz/avisplit.c
View file @
bab08e69
...
...
@@ -151,6 +151,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
PullPin
*
pin
=
This
->
Parser
.
pInputPin
;
IMediaSample
*
sample
=
NULL
;
HRESULT
hr
;
ULONG
ref
;
TRACE
(
"(%p, %u)->()
\n
"
,
This
,
streamnumber
);
...
...
@@ -264,7 +265,10 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
hr
=
IAsyncReader_Request
(
pin
->
pReader
,
sample
,
streamnumber
);
if
(
FAILED
(
hr
))
assert
(
IMediaSample_Release
(
sample
)
==
0
);
{
ref
=
IMediaSample_Release
(
sample
);
assert
(
ref
==
0
);
}
}
else
{
...
...
@@ -278,7 +282,8 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
if
(
sample
)
{
ERR
(
"There should be no sample!
\n
"
);
assert
(
IMediaSample_Release
(
sample
)
==
0
);
ref
=
IMediaSample_Release
(
sample
);
assert
(
ref
==
0
);
}
}
TRACE
(
"--> %08x
\n
"
,
hr
);
...
...
@@ -510,8 +515,8 @@ static HRESULT AVISplitter_first_request(LPVOID iface)
static
HRESULT
AVISplitter_done_process
(
LPVOID
iface
)
{
AVISplitterImpl
*
This
=
iface
;
DWORD
x
;
ULONG
ref
;
for
(
x
=
0
;
x
<
This
->
Parser
.
cStreams
;
++
x
)
{
...
...
@@ -525,7 +530,10 @@ static HRESULT AVISplitter_done_process(LPVOID iface)
stream
->
thread
=
NULL
;
if
(
stream
->
sample
)
assert
(
IMediaSample_Release
(
stream
->
sample
)
==
0
);
{
ref
=
IMediaSample_Release
(
stream
->
sample
);
assert
(
ref
==
0
);
}
stream
->
sample
=
NULL
;
ResetEvent
(
stream
->
packet_queued
);
...
...
@@ -1219,6 +1227,7 @@ static HRESULT AVISplitter_Flush(LPVOID iface)
{
AVISplitterImpl
*
This
=
iface
;
DWORD
x
;
ULONG
ref
;
TRACE
(
"(%p)->()
\n
"
,
This
);
...
...
@@ -1227,7 +1236,10 @@ static HRESULT AVISplitter_Flush(LPVOID iface)
StreamData
*
stream
=
This
->
streams
+
x
;
if
(
stream
->
sample
)
assert
(
IMediaSample_Release
(
stream
->
sample
)
==
0
);
{
ref
=
IMediaSample_Release
(
stream
->
sample
);
assert
(
ref
==
0
);
}
stream
->
sample
=
NULL
;
ResetEvent
(
stream
->
packet_queued
);
...
...
dlls/quartz/parser.c
View file @
bab08e69
...
...
@@ -170,6 +170,7 @@ void Parser_Destroy(ParserImpl *This)
{
IPin
*
connected
=
NULL
;
ULONG
pinref
;
HRESULT
hr
;
assert
(
!
This
->
filter
.
refCount
);
PullPin_WaitForStateChange
(
This
->
pInputPin
,
INFINITE
);
...
...
@@ -178,9 +179,11 @@ void Parser_Destroy(ParserImpl *This)
IPin_ConnectedTo
(
&
This
->
pInputPin
->
pin
.
IPin_iface
,
&
connected
);
if
(
connected
)
{
assert
(
IPin_Disconnect
(
connected
)
==
S_OK
);
hr
=
IPin_Disconnect
(
connected
);
assert
(
hr
==
S_OK
);
IPin_Release
(
connected
);
assert
(
IPin_Disconnect
(
&
This
->
pInputPin
->
pin
.
IPin_iface
)
==
S_OK
);
hr
=
IPin_Disconnect
(
&
This
->
pInputPin
->
pin
.
IPin_iface
);
assert
(
hr
==
S_OK
);
}
pinref
=
IPin_Release
(
&
This
->
pInputPin
->
pin
.
IPin_iface
);
if
(
pinref
)
...
...
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