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
c49e9d08
Commit
c49e9d08
authored
Sep 03, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Skip AVI bad chunks while looking for the LIST chunk.
parent
b4ce95c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
avisplit.c
dlls/quartz/avisplit.c
+15
-24
No files found.
dlls/quartz/avisplit.c
View file @
c49e9d08
...
...
@@ -1109,24 +1109,18 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
return
E_FAIL
;
}
pos
+=
sizeof
(
RIFFCHUNK
)
+
list
.
cb
;
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
pos
,
sizeof
(
list
),
(
BYTE
*
)
&
list
);
while
(
list
.
fcc
==
ckidAVIPADDING
||
(
list
.
fcc
==
FOURCC_LIST
&&
list
.
fccListType
!=
listtypeAVIMOVIE
))
/* Skip any chunks until we find the LIST chunk */
do
{
pos
+=
sizeof
(
RIFFCHUNK
)
+
list
.
cb
;
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
pos
,
sizeof
(
list
),
(
BYTE
*
)
&
list
);
}
while
(
hr
==
S_OK
&&
(
list
.
fcc
!=
FOURCC_LIST
||
(
list
.
fcc
==
FOURCC_LIST
&&
list
.
fccListType
!=
listtypeAVIMOVIE
)));
if
(
list
.
fcc
!=
FOURCC_LIST
)
{
ERR
(
"Expected LIST, but got %.04s
\n
"
,
(
LPSTR
)
&
list
.
fcc
);
return
E_FAIL
;
}
if
(
list
.
fccListType
!=
listtypeAVIMOVIE
)
if
(
hr
!=
S_OK
)
{
ERR
(
"
Expected AVI movie list, but got %.04s
\n
"
,
(
LPSTR
)
&
list
.
fccListType
);
ERR
(
"
Failed to find LIST chunk from AVI file
\n
"
);
return
E_FAIL
;
}
...
...
@@ -1134,21 +1128,18 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
/* FIXME: AVIX files are extended beyond the FOURCC chunk "AVI ", and thus won't be played here,
* once I get one of the files I'll try to fix it */
if
(
hr
==
S_OK
)
{
This
->
rtStart
=
pAviSplit
->
CurrentChunkOffset
=
MEDIATIME_FROM_BYTES
(
pos
+
sizeof
(
RIFFLIST
));
pos
+=
list
.
cb
+
sizeof
(
RIFFCHUNK
);
pAviSplit
->
EndOfFile
=
This
->
rtStop
=
MEDIATIME_FROM_BYTES
(
pos
);
if
(
pos
>
total
)
{
ERR
(
"File smaller (%x%08x) then EndOfFile (%x%08x)
\n
"
,
(
DWORD
)(
total
>>
32
),
(
DWORD
)
total
,
(
DWORD
)(
pAviSplit
->
EndOfFile
>>
32
),
(
DWORD
)
pAviSplit
->
EndOfFile
);
return
E_FAIL
;
}
This
->
rtStart
=
pAviSplit
->
CurrentChunkOffset
=
MEDIATIME_FROM_BYTES
(
pos
+
sizeof
(
RIFFLIST
));
pos
+=
list
.
cb
+
sizeof
(
RIFFCHUNK
);
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
BYTES_FROM_MEDIATIME
(
pAviSplit
->
CurrentChunkOffset
),
sizeof
(
pAviSplit
->
CurrentChunk
),
(
BYTE
*
)
&
pAviSplit
->
CurrentChunk
);
pAviSplit
->
EndOfFile
=
This
->
rtStop
=
MEDIATIME_FROM_BYTES
(
pos
);
if
(
pos
>
total
)
{
ERR
(
"File smaller (%x%08x) then EndOfFile (%x%08x)
\n
"
,
(
DWORD
)(
total
>>
32
),
(
DWORD
)
total
,
(
DWORD
)(
pAviSplit
->
EndOfFile
>>
32
),
(
DWORD
)
pAviSplit
->
EndOfFile
);
return
E_FAIL
;
}
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
BYTES_FROM_MEDIATIME
(
pAviSplit
->
CurrentChunkOffset
),
sizeof
(
pAviSplit
->
CurrentChunk
),
(
BYTE
*
)
&
pAviSplit
->
CurrentChunk
);
props
->
cbAlign
=
1
;
props
->
cbPrefix
=
0
;
/* Comrades, prevent shortage of buffers, or you will feel the consequences! DA! */
...
...
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