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
0f9356eb
Commit
0f9356eb
authored
Jul 18, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jul 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix handling of zero byte samples and endofstreams.
parent
de3afabf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
avisplit.c
dlls/quartz/avisplit.c
+19
-11
No files found.
dlls/quartz/avisplit.c
View file @
0f9356eb
...
...
@@ -147,7 +147,6 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
PullPin
*
pin
=
This
->
Parser
.
pInputPin
;
IMediaSample
*
sample
=
NULL
;
HRESULT
hr
;
BOOL
endofstream
=
FALSE
;
TRACE
(
"(%p, %u)->()
\n
"
,
This
,
streamnumber
);
...
...
@@ -198,7 +197,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
TRACE
(
"offset(%u) size(%u)
\n
"
,
(
DWORD
)
BYTES_FROM_MEDIATIME
(
rtSampleStart
),
(
DWORD
)
BYTES_FROM_MEDIATIME
(
rtSampleStop
-
rtSampleStart
));
/* End of file */
if
(
stream
->
index
_next
>=
stream
->
entries
)
if
(
stream
->
index
>=
stream
->
entries
)
{
ERR
(
"END OF STREAM ON %u
\n
"
,
streamnumber
);
IMediaSample_Release
(
sample
);
...
...
@@ -239,14 +238,14 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
&&
StreamFromFOURCC
(
This
->
oldindex
->
aIndex
[
stream
->
pos_next
].
dwChunkId
)
!=
streamnumber
);
/* End of file */
if
(
stream
->
pos_next
*
sizeof
(
This
->
oldindex
->
aIndex
[
0
])
>=
This
->
oldindex
->
cb
)
if
(
stream
->
index
)
{
IMediaSample_Release
(
sample
);
stream
->
pos_next
=
0
;
++
stream
->
index_next
;
ERR
(
"END OF STREAM ON %u
\n
"
,
streamnumber
);
hr
=
AVISplitter_SendEndOfFile
(
This
,
streamnumber
);
endofstream
=
TRU
E
;
return
S_FALS
E
;
}
}
else
/* TODO: Generate an index automagically */
...
...
@@ -255,12 +254,21 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
assert
(
0
);
}
hr
=
IMediaSample_SetTime
(
sample
,
&
rtSampleStart
,
&
rtSampleStop
);
if
(
rtSampleStart
!=
rtSampleStop
)
{
hr
=
IMediaSample_SetTime
(
sample
,
&
rtSampleStart
,
&
rtSampleStop
);
hr
=
IAsyncReader_Request
(
pin
->
pReader
,
sample
,
streamnumber
);
hr
=
IAsyncReader_Request
(
pin
->
pReader
,
sample
,
streamnumber
);
if
(
FAILED
(
hr
))
assert
(
IMediaSample_Release
(
sample
)
==
0
);
if
(
FAILED
(
hr
))
assert
(
IMediaSample_Release
(
sample
)
==
0
);
}
else
{
stream
->
sample
=
sample
;
IMediaSample_SetActualDataLength
(
sample
,
0
);
SetEvent
(
stream
->
packet_queued
);
}
}
else
{
...
...
@@ -272,9 +280,6 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
}
TRACE
(
"--> %08x
\n
"
,
hr
);
if
(
endofstream
&&
hr
==
S_OK
)
return
S_FALSE
;
return
hr
;
}
...
...
@@ -360,7 +365,10 @@ static HRESULT AVISplitter_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PT
HRESULT
hr
=
S_OK
;
if
(
!
IMediaSample_GetActualDataLength
(
pSample
))
{
ERR
(
"Received empty sample
\n
"
);
return
S_OK
;
}
/* Send the sample to whatever thread is appropiate
* That thread should also not have a sample queued at the moment
...
...
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