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
edd8bc3a
Commit
edd8bc3a
authored
Nov 26, 2003
by
Michael Günnewig
Committed by
Alexandre Julliard
Nov 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed multiple bugs in FindSample implementation of AVI and WAV file
handler.
parent
12f7a361
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
20 deletions
+29
-20
avifile.c
dlls/avifil32/avifile.c
+26
-18
wavfile.c
dlls/avifil32/wavfile.c
+3
-2
No files found.
dlls/avifil32/avifile.c
View file @
edd8bc3a
...
@@ -840,15 +840,19 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
...
@@ -840,15 +840,19 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
ULONG
n
;
ULONG
n
;
for
(
n
=
0
;
n
<
This
->
sInfo
.
dwFormatChangeCount
;
n
++
)
for
(
n
=
0
;
n
<
This
->
sInfo
.
dwFormatChangeCount
;
n
++
)
if
(
This
->
idxFmtChanges
[
n
].
ckid
>=
pos
)
if
(
This
->
idxFmtChanges
[
n
].
ckid
>=
pos
)
{
pos
=
This
->
idxFmtChanges
[
n
].
ckid
;
goto
RETURN_FOUND
;
goto
RETURN_FOUND
;
}
}
else
{
}
else
{
LONG
n
;
LONG
n
;
for
(
n
=
(
LONG
)
This
->
sInfo
.
dwFormatChangeCount
;
n
>=
0
;
n
--
)
{
for
(
n
=
(
LONG
)
This
->
sInfo
.
dwFormatChangeCount
;
n
>=
0
;
n
--
)
{
if
(
This
->
idxFmtChanges
[
n
].
ckid
<=
pos
)
if
(
This
->
idxFmtChanges
[
n
].
ckid
<=
pos
)
{
pos
=
This
->
idxFmtChanges
[
n
].
ckid
;
goto
RETURN_FOUND
;
goto
RETURN_FOUND
;
}
}
}
if
(
pos
>
(
LONG
)
This
->
sInfo
.
dwStart
)
if
(
pos
>
(
LONG
)
This
->
sInfo
.
dwStart
)
return
0
;
/* format changes always for first frame */
return
0
;
/* format changes always for first frame */
...
@@ -858,30 +862,34 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
...
@@ -858,30 +862,34 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
return
-
1
;
return
-
1
;
}
}
if
(
flags
&
FIND_RET
)
{
RETURN_FOUND:
RETURN_FOUND:
if
(
flags
&
FIND_LENGTH
)
{
if
(
pos
<
(
LONG
)
This
->
sInfo
.
dwStart
)
return
-
1
;
switch
(
flags
&
FIND_RET
)
{
case
FIND_LENGTH
:
/* physical size */
pos
=
This
->
idxFrames
[
pos
].
dwChunkLength
;
break
;
case
FIND_OFFSET
:
/* physical position */
pos
=
This
->
idxFrames
[
pos
].
dwChunkOffset
+
2
*
sizeof
(
DWORD
)
+
offset
*
This
->
sInfo
.
dwSampleSize
;
break
;
case
FIND_SIZE
:
/* logical size */
/* logical size */
if
(
This
->
sInfo
.
dwSampleSize
)
if
(
This
->
sInfo
.
dwSampleSize
)
pos
=
This
->
sInfo
.
dwSampleSize
;
pos
=
This
->
sInfo
.
dwSampleSize
;
else
else
pos
=
1
;
pos
=
1
;
}
else
if
(
flags
&
FIND_OFFSET
)
{
break
;
/* physical position */
case
FIND_INDEX
:
pos
=
This
->
idxFrames
[
pos
].
dwChunkOffset
+
offset
*
This
->
sInfo
.
dwSampleSize
;
FIXME
(
": FIND_INDEX flag is not supported!
\n
"
);
}
else
if
(
flags
&
FIND_SIZE
)
{
/* This is an index in the index-table on disc. */
/* physical size */
break
;
pos
=
This
->
idxFrames
[
pos
].
dwChunkLength
;
};
/* else logical position */
}
else
if
(
flags
&
FIND_INDEX
)
{
FIXME
(
": FIND_INDEX flag is not supported!"
);
pos
=
This
->
paf
->
dwIdxChunkPos
;
}
/* else logical position */
return
pos
;
return
pos
;
}
return
-
1
;
}
}
static
HRESULT
WINAPI
IAVIStream_fnReadFormat
(
IAVIStream
*
iface
,
LONG
pos
,
static
HRESULT
WINAPI
IAVIStream_fnReadFormat
(
IAVIStream
*
iface
,
LONG
pos
,
...
...
dlls/avifil32/wavfile.c
View file @
edd8bc3a
...
@@ -757,9 +757,10 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
...
@@ -757,9 +757,10 @@ static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos,
pos
=
0
;
pos
=
0
;
}
}
if
(
flags
&
(
FIND_LENGTH
|
FIND_SIZE
))
if
((
flags
&
FIND_RET
)
==
FIND_LENGTH
||
(
flags
&
FIND_RET
)
==
FIND_SIZE
)
return
This
->
sInfo
.
dwSampleSize
;
return
This
->
sInfo
.
dwSampleSize
;
if
(
flags
&
FIND_OFFSET
)
if
(
(
flags
&
FIND_RET
)
==
FIND_OFFSET
)
return
This
->
ckData
.
dwDataOffset
+
pos
*
This
->
sInfo
.
dwSampleSize
;
return
This
->
ckData
.
dwDataOffset
+
pos
*
This
->
sInfo
.
dwSampleSize
;
return
pos
;
return
pos
;
...
...
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