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
6fd90f16
Commit
6fd90f16
authored
Mar 30, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Small mpeg splitter fixes.
Just to be cautious, since it reads 4 bytes it should stop trying at EOF-3. Also be more strict with the return values.
parent
0faee4af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
mpegsplit.c
dlls/quartz/mpegsplit.c
+4
-2
No files found.
dlls/quartz/mpegsplit.c
View file @
6fd90f16
...
@@ -651,16 +651,18 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin)
...
@@ -651,16 +651,18 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin)
This
->
EndOfFile
-=
128
;
This
->
EndOfFile
-=
128
;
/* http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has a whole readup on audio headers */
/* http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has a whole readup on audio headers */
while
(
pos
<
This
->
EndOfFile
&&
SUCCEEDED
(
hr
)
)
while
(
pos
+
3
<
This
->
EndOfFile
)
{
{
LONGLONG
length
=
0
;
LONGLONG
length
=
0
;
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
,
4
,
header
);
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
,
4
,
header
);
if
(
hr
!=
S_OK
)
break
;
while
(
parse_header
(
header
,
&
length
,
&
duration
))
while
(
parse_header
(
header
,
&
length
,
&
duration
))
{
{
/* No valid header yet; shift by a byte and check again */
/* No valid header yet; shift by a byte and check again */
memmove
(
header
,
header
+
1
,
3
);
memmove
(
header
,
header
+
1
,
3
);
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
++
,
1
,
header
+
3
);
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
++
,
1
,
header
+
3
);
if
(
FAILED
(
hr
)
)
if
(
hr
!=
S_OK
||
This
->
EndOfFile
-
pos
<
4
)
break
;
break
;
}
}
pos
+=
length
;
pos
+=
length
;
...
...
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