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
dba95c22
Commit
dba95c22
authored
Nov 07, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix time on avi parser.
parent
af33888b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
avisplit.c
dlls/quartz/avisplit.c
+27
-10
No files found.
dlls/quartz/avisplit.c
View file @
dba95c22
...
...
@@ -291,7 +291,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample,
{
Parser_OutputPin
*
pin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
+
streamnumber
];
HRESULT
hr
;
LONGLONG
start
,
stop
;
LONGLONG
start
,
stop
,
rtstart
,
rtstop
;
StreamData
*
stream
=
&
This
->
streams
[
streamnumber
];
start
=
pin
->
dwSamplesProcessed
;
...
...
@@ -314,7 +314,29 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample,
stop
*=
10000000
;
stop
/=
stream
->
streamheader
.
dwRate
;
IMediaSample_SetTime
(
sample
,
&
start
,
&
stop
);
if
(
IMediaSample_IsDiscontinuity
(
sample
)
==
S_OK
)
{
IPin
*
victim
;
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
pin
->
pin
.
pin
.
tStart
=
start
;
pin
->
pin
.
pin
.
dRate
=
This
->
Parser
.
sourceSeeking
.
dRate
;
hr
=
IPin_ConnectedTo
((
IPin
*
)
pin
,
&
victim
);
if
(
hr
==
S_OK
)
{
hr
=
IPin_NewSegment
(
victim
,
start
,
This
->
Parser
.
sourceSeeking
.
llStop
,
This
->
Parser
.
sourceSeeking
.
dRate
);
if
(
hr
!=
S_OK
)
FIXME
(
"NewSegment returns %08x
\n
"
,
hr
);
IPin_Release
(
victim
);
}
LeaveCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
if
(
hr
!=
S_OK
)
return
hr
;
}
rtstart
=
(
double
)(
start
-
pin
->
pin
.
pin
.
tStart
)
/
pin
->
pin
.
pin
.
dRate
;
rtstop
=
(
double
)(
stop
-
pin
->
pin
.
pin
.
tStart
)
/
pin
->
pin
.
pin
.
dRate
;
hr
=
IMediaSample_SetMediaTime
(
sample
,
&
start
,
&
stop
);
IMediaSample_SetTime
(
sample
,
&
rtstart
,
&
rtstop
);
IMediaSample_SetMediaTime
(
sample
,
&
start
,
&
stop
);
hr
=
BaseOutputPinImpl_Deliver
((
BaseOutputPin
*
)
&
pin
->
pin
,
sample
);
...
...
@@ -426,6 +448,9 @@ static HRESULT AVISplitter_first_request(LPVOID iface)
stream
->
pos_next
=
stream
->
pos
;
stream
->
index_next
=
stream
->
index
;
/* This was sent after stopped->paused or stopped->playing, so set seek */
stream
->
seek
=
1
;
/* There should be a packet queued from AVISplitter_next_request last time
* It needs to be done now because this is the only way to ensure that every
* stream will have at least 1 packet processed
...
...
@@ -1285,7 +1310,6 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
{
Parser_OutputPin
*
pin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
+
x
];
StreamData
*
stream
=
This
->
streams
+
x
;
IPin
*
victim
=
NULL
;
LONGLONG
wanted_frames
;
DWORD
last_keyframe
=
0
,
last_keyframeidx
=
0
,
preroll
=
0
;
...
...
@@ -1294,13 +1318,6 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
wanted_frames
/=
10000000
;
wanted_frames
/=
stream
->
streamheader
.
dwScale
;
IPin_ConnectedTo
((
IPin
*
)
pin
,
&
victim
);
if
(
victim
)
{
IPin_NewSegment
(
victim
,
newpos
,
endpos
,
pPin
->
dRate
);
IPin_Release
(
victim
);
}
pin
->
dwSamplesProcessed
=
0
;
stream
->
index
=
0
;
stream
->
pos
=
0
;
...
...
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