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
975dc033
Commit
975dc033
authored
Apr 01, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Make acmwrapper respond to a sample discontinuity by dropping the frame after parsing it.
parent
553fe856
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
acmwrapper.c
dlls/quartz/acmwrapper.c
+20
-7
No files found.
dlls/quartz/acmwrapper.c
View file @
975dc033
...
...
@@ -47,7 +47,6 @@ typedef struct ACMWrapperImpl
HACMSTREAM
has
;
LPWAVEFORMATEX
pWfIn
;
LPWAVEFORMATEX
pWfOut
;
BOOL
reinit_codec
;
/* FIXME: Should use sync points instead */
}
ACMWrapperImpl
;
static
HRESULT
ACMWrapper_ProcessSampleData
(
TransformFilterImpl
*
pTransformFilter
,
IMediaSample
*
pSample
)
...
...
@@ -115,19 +114,31 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte
}
unprepare_header
=
TRUE
;
if
((
res
=
acmStreamConvert
(
This
->
has
,
&
ash
,
This
->
reinit_codec
?
ACM_STREAMCONVERTF_START
:
0
)))
{
if
(
IMediaSample_IsDiscontinuity
(
pSample
)
==
S_OK
)
res
=
acmStreamConvert
(
This
->
has
,
&
ash
,
ACM_STREAMCONVERTF_START
);
else
res
=
acmStreamConvert
(
This
->
has
,
&
ash
,
0
);
if
(
res
)
{
if
(
res
!=
MMSYSERR_MOREDATA
)
ERR
(
"Cannot convert data header %d
\n
"
,
res
);
goto
error
;
}
This
->
reinit_codec
=
FALSE
;
TRACE
(
"used in %u/%u, used out %u/%u
\n
"
,
ash
.
cbSrcLengthUsed
,
ash
.
cbSrcLength
,
ash
.
cbDstLengthUsed
,
ash
.
cbDstLength
);
hr
=
IMediaSample_SetActualDataLength
(
pOutSample
,
ash
.
cbDstLengthUsed
);
assert
(
hr
==
S_OK
);
assert
(
ash
.
cbSrcLengthUsed
);
if
(
!
ash
.
cbSrcLengthUsed
)
{
WARN
(
"Sample was skipped
\n
"
);
ash
.
cbSrcLength
=
0
;
goto
error
;
}
TRACE
(
"Sample start time: %u.%03u
\n
"
,
(
DWORD
)(
tStart
/
10000000
),
(
DWORD
)((
tStart
/
10000
)
%
1000
));
if
(
ash
.
cbSrcLengthUsed
==
cbSrcStream
)
{
...
...
@@ -148,7 +159,11 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte
}
TRACE
(
"Sample stop time: %u.%03u
\n
"
,
(
DWORD
)(
tStart
/
10000000
),
(
DWORD
)((
tStart
/
10000
)
%
1000
));
hr
=
OutputPin_SendSample
((
OutputPin
*
)
This
->
tf
.
ppPins
[
1
],
pOutSample
);
if
(
IMediaSample_IsDiscontinuity
(
pSample
)
==
S_FALSE
)
hr
=
OutputPin_SendSample
((
OutputPin
*
)
This
->
tf
.
ppPins
[
1
],
pOutSample
);
else
TRACE
(
"Skipping first sample: Discontinuity
\n
"
);
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
)
{
if
(
FAILED
(
hr
))
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
...
...
@@ -259,8 +274,6 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
This
=
CoTaskMemAlloc
(
sizeof
(
ACMWrapperImpl
));
ZeroMemory
(
This
,
sizeof
(
ACMWrapperImpl
));
This
->
reinit_codec
=
TRUE
;
hr
=
TransformFilter_Create
(
&
(
This
->
tf
),
&
CLSID_ACMWrapper
,
&
ACMWrapper_FuncsTable
,
NULL
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
...
...
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