Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
92ee89c9
Commit
92ee89c9
authored
Jan 19, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/avidec: Use the strmbase stream lock.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
53d8a28a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
avidec.c
dlls/quartz/avidec.c
+2
-16
No files found.
dlls/quartz/avidec.c
View file @
92ee89c9
...
...
@@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
struct
avi_decompressor
{
struct
strmbase_filter
filter
;
CRITICAL_SECTION
stream_cs
;
struct
strmbase_source
source
;
IQualityControl
source_IQualityControl_iface
;
...
...
@@ -129,13 +128,10 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
if
(
This
->
sink
.
flushing
)
return
S_FALSE
;
EnterCriticalSection
(
&
This
->
stream_cs
);
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
if
(
FAILED
(
hr
))
{
ERR
(
"Cannot get pointer to sample data (%x)
\n
"
,
hr
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
hr
;
}
...
...
@@ -149,7 +145,6 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
source
,
&
pOutSample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
hr
;
}
...
...
@@ -160,7 +155,6 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get pointer to buffer (%x)
\n
"
,
hr
);
IMediaSample_Release
(
pOutSample
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
hr
;
}
cbDstStream
=
IMediaSample_GetSize
(
pOutSample
);
...
...
@@ -168,7 +162,6 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
{
ERR
(
"Sample size is too small (%u < %u).
\n
"
,
cbDstStream
,
source_format
->
bmiHeader
.
biSizeImage
);
IMediaSample_Release
(
pOutSample
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
E_FAIL
;
}
...
...
@@ -187,7 +180,6 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
/* Drop sample if it's intended to be dropped */
if
(
flags
&
ICDECOMPRESS_HURRYUP
)
{
IMediaSample_Release
(
pOutSample
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
S_OK
;
}
...
...
@@ -209,7 +201,6 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
IMediaSample_Release
(
pOutSample
);
LeaveCriticalSection
(
&
This
->
stream_cs
);
return
hr
;
}
...
...
@@ -491,12 +482,12 @@ static HRESULT WINAPI avi_decompressor_source_qc_Notify(IQualityControl *iface,
TRACE
(
"filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s.
\n
"
,
filter
,
sender
,
q
.
Type
,
q
.
Proportion
,
debugstr_time
(
q
.
Late
),
debugstr_time
(
q
.
TimeStamp
));
EnterCriticalSection
(
&
filter
->
stream_cs
);
EnterCriticalSection
(
&
filter
->
filter
.
stream_cs
);
if
(
q
.
Late
>
0
)
filter
->
late
=
q
.
Late
+
q
.
TimeStamp
;
else
filter
->
late
=
-
1
;
LeaveCriticalSection
(
&
filter
->
stream_cs
);
LeaveCriticalSection
(
&
filter
->
filter
.
stream_cs
);
return
S_OK
;
}
...
...
@@ -545,8 +536,6 @@ static void avi_decompressor_destroy(struct strmbase_filter *iface)
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_passthrough_cleanup
(
&
filter
->
passthrough
);
filter
->
stream_cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
filter
->
stream_cs
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
free
(
filter
);
...
...
@@ -614,9 +603,6 @@ HRESULT avi_dec_create(IUnknown *outer, IUnknown **out)
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_AVIDec
,
&
filter_ops
);
InitializeCriticalSection
(
&
object
->
stream_cs
);
object
->
stream_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": avi_decompressor.stream_cs"
);
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"In"
,
&
sink_ops
,
NULL
);
strmbase_source_init
(
&
object
->
source
,
&
object
->
filter
,
L"Out"
,
&
source_ops
);
...
...
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