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
8c42595c
Commit
8c42595c
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 MPEG splitter.
parent
dba95c22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
10 deletions
+24
-10
mpegsplit.c
dlls/quartz/mpegsplit.c
+24
-10
No files found.
dlls/quartz/mpegsplit.c
View file @
8c42595c
...
@@ -171,7 +171,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
...
@@ -171,7 +171,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
Parser_OutputPin
*
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
];
Parser_OutputPin
*
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
];
LONGLONG
length
=
0
;
LONGLONG
length
=
0
;
LONGLONG
pos
=
BYTES_FROM_MEDIATIME
(
This
->
Parser
.
pInputPin
->
rtNext
);
LONGLONG
pos
=
BYTES_FROM_MEDIATIME
(
This
->
Parser
.
pInputPin
->
rtNext
);
LONGLONG
time
=
This
->
position
;
LONGLONG
time
=
This
->
position
,
rtstop
,
rtstart
;
HRESULT
hr
;
HRESULT
hr
;
BYTE
*
fbuf
=
NULL
;
BYTE
*
fbuf
=
NULL
;
DWORD
len
=
IMediaSample_GetActualDataLength
(
pCurrentSample
);
DWORD
len
=
IMediaSample_GetActualDataLength
(
pCurrentSample
);
...
@@ -229,7 +229,28 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
...
@@ -229,7 +229,28 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
TRACE
(
"Media time : %u.%03u
\n
"
,
(
DWORD
)(
This
->
position
/
10000000
),
(
DWORD
)((
This
->
position
/
10000
)
%
1000
));
TRACE
(
"Media time : %u.%03u
\n
"
,
(
DWORD
)(
This
->
position
/
10000000
),
(
DWORD
)((
This
->
position
/
10000
)
%
1000
));
IMediaSample_SetTime
(
pCurrentSample
,
&
time
,
&
This
->
position
);
if
(
IMediaSample_IsDiscontinuity
(
pCurrentSample
)
==
S_OK
)
{
IPin
*
victim
;
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
pOutputPin
->
pin
.
pin
.
tStart
=
time
;
pOutputPin
->
pin
.
pin
.
dRate
=
This
->
Parser
.
sourceSeeking
.
dRate
;
hr
=
IPin_ConnectedTo
((
IPin
*
)
pOutputPin
,
&
victim
);
if
(
hr
==
S_OK
)
{
hr
=
IPin_NewSegment
(
victim
,
time
,
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
)(
time
-
pOutputPin
->
pin
.
pin
.
tStart
)
/
pOutputPin
->
pin
.
pin
.
dRate
;
rtstop
=
(
double
)(
This
->
position
-
pOutputPin
->
pin
.
pin
.
tStart
)
/
pOutputPin
->
pin
.
pin
.
dRate
;
IMediaSample_SetTime
(
pCurrentSample
,
&
rtstart
,
&
rtstop
);
IMediaSample_SetMediaTime
(
pCurrentSample
,
&
time
,
&
This
->
position
);
hr
=
BaseOutputPinImpl_Deliver
((
BaseOutputPin
*
)
&
pOutputPin
->
pin
,
pCurrentSample
);
hr
=
BaseOutputPinImpl_Deliver
((
BaseOutputPin
*
)
&
pOutputPin
->
pin
,
pCurrentSample
);
...
@@ -672,7 +693,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface)
...
@@ -672,7 +693,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface)
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
PullPin
*
pin
=
This
->
Parser
.
pInputPin
;
PullPin
*
pin
=
This
->
Parser
.
pInputPin
;
IPin
*
victim
=
NULL
;
TRACE
(
"Moving sound to %08u bytes!
\n
"
,
(
DWORD
)
bytepos
);
TRACE
(
"Moving sound to %08u bytes!
\n
"
,
(
DWORD
)
bytepos
);
...
@@ -682,12 +702,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface)
...
@@ -682,12 +702,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface)
/* Make sure this is done while stopped, BeginFlush takes care of this */
/* Make sure this is done while stopped, BeginFlush takes care of this */
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
memcpy
(
This
->
header
,
header
,
4
);
memcpy
(
This
->
header
,
header
,
4
);
IPin_ConnectedTo
(
This
->
Parser
.
ppPins
[
1
],
&
victim
);
if
(
victim
)
{
IPin_NewSegment
(
victim
,
newpos
,
This
->
duration
,
pin
->
dRate
);
IPin_Release
(
victim
);
}
pin
->
rtStart
=
pin
->
rtCurrent
=
MEDIATIME_FROM_BYTES
(
bytepos
);
pin
->
rtStart
=
pin
->
rtCurrent
=
MEDIATIME_FROM_BYTES
(
bytepos
);
pin
->
rtStop
=
MEDIATIME_FROM_BYTES
((
REFERENCE_TIME
)
This
->
EndOfFile
);
pin
->
rtStop
=
MEDIATIME_FROM_BYTES
((
REFERENCE_TIME
)
This
->
EndOfFile
);
...
@@ -744,7 +758,7 @@ static HRESULT MPEGSplitter_first_request(LPVOID iface)
...
@@ -744,7 +758,7 @@ static HRESULT MPEGSplitter_first_request(LPVOID iface)
pin
->
rtNext
=
rtSampleStop
;
pin
->
rtNext
=
rtSampleStop
;
IMediaSample_SetPreroll
(
sample
,
FALSE
);
IMediaSample_SetPreroll
(
sample
,
FALSE
);
IMediaSample_SetDiscontinuity
(
sample
,
T
his
->
seek
);
IMediaSample_SetDiscontinuity
(
sample
,
T
RUE
);
IMediaSample_SetSyncPoint
(
sample
,
1
);
IMediaSample_SetSyncPoint
(
sample
,
1
);
This
->
seek
=
0
;
This
->
seek
=
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