Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3a7f5494
Commit
3a7f5494
authored
Nov 30, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/transform: Hold the streaming lock for the entirety of Receive().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b7ce569
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
21 deletions
+10
-21
acmwrapper.c
dlls/quartz/acmwrapper.c
+0
-4
avidec.c
dlls/quartz/avidec.c
+9
-13
transform.c
dlls/strmbase/transform.c
+1
-1
gsttffilter.c
dlls/winegstreamer/gsttffilter.c
+0
-3
No files found.
dlls/quartz/acmwrapper.c
View file @
3a7f5494
...
...
@@ -66,12 +66,10 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
LONGLONG
tStart
=
-
1
,
tStop
=
-
1
,
tMed
;
LONGLONG
mtStart
=
-
1
,
mtStop
=
-
1
,
mtMed
;
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
if
(
FAILED
(
hr
))
{
ERR
(
"Cannot get pointer to sample data (%x)
\n
"
,
hr
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
return
hr
;
}
...
...
@@ -107,7 +105,6 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
return
hr
;
}
IMediaSample_SetPreroll
(
pOutSample
,
preroll
);
...
...
@@ -224,7 +221,6 @@ error:
This
->
lasttime_real
=
tStop
;
This
->
lasttime_sent
=
tMed
;
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
return
hr
;
}
...
...
dlls/quartz/avidec.c
View file @
3a7f5494
...
...
@@ -111,12 +111,11 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
LONGLONG
tStart
,
tStop
;
DWORD
flags
=
0
;
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
if
(
FAILED
(
hr
))
{
ERR
(
"Cannot get pointer to sample data (%x)
\n
"
,
hr
);
goto
erro
r
;
return
h
r
;
}
cbSrcStream
=
IMediaSample_GetActualDataLength
(
pSample
);
...
...
@@ -129,7 +128,7 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
tf
.
source
,
&
pOutSample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
goto
erro
r
;
return
h
r
;
}
hr
=
IMediaSample_SetActualDataLength
(
pOutSample
,
0
);
...
...
@@ -138,13 +137,14 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
hr
=
IMediaSample_GetPointer
(
pOutSample
,
&
pbDstStream
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get pointer to buffer (%x)
\n
"
,
hr
);
goto
error
;
IMediaSample_Release
(
pOutSample
);
return
hr
;
}
cbDstStream
=
IMediaSample_GetSize
(
pOutSample
);
if
(
cbDstStream
<
This
->
pBihOut
->
biSizeImage
)
{
ERR
(
"Sample size is too small %d < %d
\n
"
,
cbDstStream
,
This
->
pBihOut
->
biSizeImage
);
hr
=
E_FAIL
;
goto
error
;
IMediaSample_Release
(
pOutSample
)
;
return
E_FAIL
;
}
if
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
)
...
...
@@ -161,8 +161,8 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
/* Drop sample if it's intended to be dropped */
if
(
flags
&
ICDECOMPRESS_HURRYUP
)
{
hr
=
S_OK
;
goto
error
;
IMediaSample_Release
(
pOutSample
)
;
return
S_OK
;
}
IMediaSample_SetActualDataLength
(
pOutSample
,
This
->
pBihOut
->
biSizeImage
);
...
...
@@ -187,11 +187,7 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
)
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
error:
if
(
pOutSample
)
IMediaSample_Release
(
pOutSample
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
IMediaSample_Release
(
pOutSample
);
return
hr
;
}
...
...
dlls/strmbase/transform.c
View file @
3a7f5494
...
...
@@ -82,12 +82,12 @@ static HRESULT WINAPI TransformFilter_Input_Receive(struct strmbase_sink *This,
return
S_FALSE
;
}
LeaveCriticalSection
(
&
pTransform
->
csReceive
);
if
(
pTransform
->
pFuncsTable
->
pfnReceive
)
hr
=
pTransform
->
pFuncsTable
->
pfnReceive
(
pTransform
,
pInSample
);
else
hr
=
S_FALSE
;
LeaveCriticalSection
(
&
pTransform
->
csReceive
);
return
hr
;
}
...
...
dlls/winegstreamer/gsttffilter.c
View file @
3a7f5494
...
...
@@ -227,7 +227,6 @@ static HRESULT WINAPI Gstreamer_transform_ProcessData(TransformFilter *iface, IM
mark_wine_thread
();
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
IMediaSample_GetPointer
(
sample
,
&
data
);
IMediaSample_AddRef
(
sample
);
...
...
@@ -235,7 +234,6 @@ static HRESULT WINAPI Gstreamer_transform_ProcessData(TransformFilter *iface, IM
buf
=
gst_buffer_new_wrapped_full
(
0
,
data
,
bufsize
,
0
,
bufsize
,
sample
,
release_sample_wrapper
);
if
(
!
buf
)
{
IMediaSample_Release
(
sample
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
return
S_OK
;
}
...
...
@@ -259,7 +257,6 @@ static HRESULT WINAPI Gstreamer_transform_ProcessData(TransformFilter *iface, IM
GST_BUFFER_FLAG_SET
(
buf
,
GST_BUFFER_FLAG_LIVE
);
if
(
IMediaSample_IsSyncPoint
(
sample
)
!=
S_OK
)
GST_BUFFER_FLAG_SET
(
buf
,
GST_BUFFER_FLAG_DELTA_UNIT
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
ret
=
gst_pad_push
(
This
->
my_src
,
buf
);
if
(
ret
)
WARN
(
"Sending returned: %i
\n
"
,
ret
);
...
...
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